You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Every request re-analyses the document, so latency grows with its size even without edits #95
Driving comline-lsp over stdio with one struct of N fields, the same hover twice in a row, with no edit in between, takes:
Fields
First hover after the text changes
The same hover again, no change
After a 1-character edit
1,000
0.32 s
0.20 s
0.32 s
5,000
2.09 s
1.10 s
1.58 s
20,000
8.22 s
5.17 s
7.39 s
An unchanged document still costs seconds per request, growing linearly with its size, so the analysis appears to run per request rather than once per change. A single file that large is unusual, but analysis covers the whole package, so many files add up the same way, and every hover, completion and highlighting request pays it.
Fix: keep each document's analysis until it changes (and the package's until a file in it changes), and serve requests from it. Then a request costs the lookup, and only an edit costs analysis.
Activity