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
Working on #1131 I hit some severe performance issues around aggregate rule violations, frequently leading to the language server to either hang, or heavily tax the CPU. The reason for this is that aggregate violations currently result in the entire workspace to be linted. Any change later in that package will again lead to the entire workspace to be linted, and so on... instead, I think we should do the following in the context of LSP (and only in that context):
Separate aggregation from linting. I think we do this already internally, but calling linter.Lint() will obviously do both.
On server startup, collect aggregate data from all aggregate rules, and store in the server cache.
On file changes, collect aggregate data only from that file, and replace existing data for that file.
On file changes, request linting of both normal rules and aggregate rules, using the aggregated data as input for the latter.
Yeah this sounds like a good plan to me. As I understand it, the aggregates are already set on the report, just never shown. So when we complete linting, we can stash these in the cache pretty easily.
I guess the core part that needs to be adjusted is
Working on #1131 I hit some severe performance issues around aggregate rule violations, frequently leading to the language server to either hang, or heavily tax the CPU. The reason for this is that aggregate violations currently result in the entire workspace to be linted. Any change later in that package will again lead to the entire workspace to be linted, and so on... instead, I think we should do the following in the context of LSP (and only in that context):
linter.Lint()
will obviously do both.CC @charlieegan3 for ideas.
The text was updated successfully, but these errors were encountered: