Files
sdk/pkg/analysis_server/lib/src/computer
Danny Tuppeny 2c9cfbd1e1 [analysis_server] Change LSP document highlights computer to not build all groups for the whole file
As a copy of Occurrences, this computer would previously build all of the groups for all elements (/loop nodes) in the document and then filter at the end.

With this change, we determine the target element(s) or node first, and then only collect the related tokens as we walk the AST.

This should reduce the amount of memory used and reduce the cost of doing something like https://github.com/Dart-Code/Dart-Code/issues/4670 which may add some additional computation for resolving members to their super-most element.

Change-Id: Id516dbdf26b0b6ac3b1bedc7bc092f1f79f94a95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/479622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-02-11 08:41:39 -08:00
..