-
Notifications
You must be signed in to change notification settings - Fork 23
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
Autocomplete/suggestions take 9s+ [0.31] #99
Comments
How large is your workspace? E.g., number of files, total lines of code, and included gems How big is the file you're editing? In my experience, performance can degrade with files above ~2000 lines. Is the workspace on a local drive or a network share? You can also try to setting |
I've got 15 folders in my workspace, but only three of them are Ruby. The Ruby ones are, I'd say, total less than 10k LOC. Number of gems in each varies, but the Gemfiles are average 125 lines long? The workspace is a local drive (SSD). "performance can degrade with files above ~2000 lines." - does that mean that one file with 2k lines will cause issues? |
That doesn't sound big enough to cause so much lag. It might have a significant impact on initialization time, but not so much in completion suggestions.
Yes, specifically if it's the one you're currently editing. The workspace as a whole should be able to handle tens of thousands of lines. |
The file I'm using is 24 lines long and just has one class in it. I turned on logging to |
No, that's definitely unusual. Are you using the most current versions of the extension (0.19.1) and the gem (0.31.1)? |
Every time I type, I get a dumpout in the console that looks roughly like this. I see And yeah, this is using the latest extension and gem. I just tried disabling all of my current extensions and left this one on, and it still happens. |
The Are you working in a multi-root workspace? |
I got the same problem, loading time was very long for suggestions and autocomplete. I just deleted the .solargraph.yml file and it worked... |
@YoannNovaxis Thanks for the tip. Can you tell me if you still have the problem when you generate a default .solargraph.yml file? It should result in the same configuration you'd get without a file. |
@castwide I did not have the problem after generating default .solargraph.yml file. When I had the problem the file looked like
The default file with command solargraph config look like
It seems that some options correct the problem. |
My guess, the additional |
@castwide: Yes, it's multi-root. When I said there were 15 folders, I meant each of those is a separate root. An edit in any file causes them all to reindex? |
Yep, that's the problem. It appears to be specific to multi-root. Editing a file should not require a reindex of any of the folders, including the one that contains the file. I should be able to work a fix into the next patch release. |
Awesome, looking forward to it. Let me know when it's in and I'll test. |
The fix is published in gem v0.31.2. |
@castwide It's much, much better now. And I can confirm that I'm not seeing constant reindexing. Thanks! |
I think this has been an issue for me for awhile, but I've noticed it more and more.
Basically, suggestions consistently take around 9 seconds. I've tried
Stri(Ctrl+C)
,String.new.(Ctrl+C)
,Enum(Ctrl+C)
, and it's always the same. Developer Tools doesn't show any errors. I've got a.solargraph.yml
which excludes.git
and a number of other folders.These are the only changes in my
settings.json
:Seems like it's good for everyone else, so I'm not sure what's going on. Any ideas?
The text was updated successfully, but these errors were encountered: