-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve efficiency of go to implementation for non workspace symbols #1287
Comments
Hi @tgodzik, I know very little of the code base of the project for the moment but I'm interested in this ticket. I'm currently reading metals doc, and https://scalameta.org/docs/semanticdb/specification.html#symbol. Is |
@joriscode Awesome! This is quite an isolated issue, so you are welcome to take a look. Most things that need to modified are in What we want is to replace the GlobalSymbolTable with just information about the class inheritance that we could get via classgraph. The workflow I would recommend is running the
We want to first confirm that we can get a much better performance from Let me know if you need any more info! |
@joriscode did you manage to take a look at this? Or is it a harder problem than we thought? |
@tgodzik Tbh, I had little time to look at it and I won't have more time for the coming week. However, I'm still interested in solving this issue. It goes without saying, that if this is blocking somehow the project or someone, I happily withdraw myself from the issue. |
@joriscode It's not blocking, but I am worried that as a result of #1388 finding references might get slower. However, I doubt if anyone else will be able to take a look at it. Also, I did some thinking and I suppose what we need to do here is to load information about class signatures from classgraph and translate them to semanticdb ClassSignature complete with filed/method signatures. |
Hi @tgodzik! I've been looking into this a bit - I don't think that switching to classgraph would be a good approach if you'd want to collect How about creating an eager and parallel alternative to the lazy BTW, do you have any specific goals in mind? Like a specific benchmark or memory usage goal that you'd like to achieve? |
Hey @pvid, thanks for the interest!
What we could do is to keep an additional cache of symbol parents and always search for all of those symbols when searching for references. Using that the
This is all a lot of work, but can be done over multiple steps and I think is much more doable than implementing the new global cache. It should also greatly improve the efficiency of multiple things. I you need some more clarification about anything do let me know! |
@tgodzik thanks for the write up! I can’t promise anything timewise, but I will certainly look into this if I have any free time |
No worries! A lot have changed since I created the issue so I wanted to rethink what actually needs to be done and write it down here. There is a bunch of things that can be done separately here, so I think this might be more doable. |
Currently, when looking for implementations of non workspace sources like RuntimeException, we load all information about the classpath.
To make if faster we could use https://github.com/classgraph/classgraph
Otherwise some hand crafted solution might be needed.
The text was updated successfully, but these errors were encountered: