-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dart LSP re-analyzes project when typing starts after period of inactivity #55815
Comments
In the log you sent, following the Can you clarify exactly what you're seeing that makes it seem like it's reanalyzing the whole project? You mention slow completion above, but the first completion in this log seems to be quite a long way after the line you quoted above. It would be useful to have a log along with some approx timings and description of what you see, for ex: 10:00 left VS Code open That would make it easier to find the relevant part of the log and know exactly which parts are important. Thanks! |
I see the "Analyzing" spinner in VSCode in the bottom left when I start typing. I'm guessing you saw my edits on line 3692 in the log file and indeed that is a ways away from line 845! However, I distinctly remember as soon as I started typing and looking at the instr log file again, it ballooned like it added a few thousand lines right after. Seeing as those 3000 lines are basically all from |
It is normal to see "analyzing" appear for a short period when you type (because typing does trigger analysis of the files being changed), however it shouldn't last long. Looking at the log, I see that a lot of this work seemed to start after you opened the file and I agree it does seem like it might be in |
@Reprevise I tried to reproduce this issue by adding custom_lint to a project, but it did not occur. All of the diagnostic updates I see are specifically for the files I'm modifying. When you see this - do you know if all the files that appear in the log (as sending new diagnostic) depend on the file you're modifying? If you're able to reproduce this behaviour in any shareable project, I'd be keen to test with it. |
It's pretty likely, considering that auth file is a "core" file. At this point, I'm tempted to close this issue as I believe it's just a |
Based on your description it does sound like this is normal re-analysis of files that depend on the one modified, and You might be able to isolate this to a particular lint (or set of lints) by enabling/disabling them (I'm not too familiar with custom_lint so I don't know how easy that is), or the specific lints don't seem to matter (and it just takes a long time regardless of which lint(s) are enabled), it might be worth filing an issue against custom_lint with the details. |
If I open my Flutter project, then go to do something else and come back and start typing again, the LSP seems to re-analyze the whole project again. Autocomplete gets stuck on "Loading...", etc. I have sent logs to @DanTup for a previous issue (#52947) that include this issue.
I believe it starts here: (Line 845 onwards)
The text was updated successfully, but these errors were encountered: