Files
sdk/pkg/analysis_server
Jens Johansen 820a1ec5a5 [analysis server] Don't allocate on each compare when sorting in semanticTokens/full
Upon a `textDocument/semanticTokens/full` request the analysis server
sorts the "tokens" via `sort` on List giving it a compare method.
The method, though, created a map literal for each comparison.
This CL "inlines" the map (it only had one entry anyway) and adds a
benchmark, where I note these changes:

```
1000:
Difference at 95.0% confidence
        -0.0274151 +/- 0.0135978
        -33.1981% +/- 16.4662%
        (Student's t, pooled s = 0.0181832)

2000:
Difference at 95.0% confidence
        -0.027344 +/- 0.0096196
        -20.9529% +/- 7.3712%
        (Student's t, pooled s = 0.0128635)

4000:
Difference at 95.0% confidence
        -0.108847 +/- 0.0196627
        -35.3172% +/- 6.37987%
        (Student's t, pooled s = 0.0262932)

8000:
Difference at 95.0% confidence
        -0.20647 +/- 0.0272577
        -34.4932% +/- 4.55371%
        (Student's t, pooled s = 0.0364494)

16000:
Difference at 95.0% confidence
        -0.384931 +/- 0.0401393
        -31.4809% +/- 3.28272%
        (Student's t, pooled s = 0.0536748)
```
Change-Id: Ibacce056cd3f154afc9377805bbccfd8c5ca9ea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-10-22 23:42:19 -07:00
..
2025-10-10 11:30:11 -07:00
2025-09-03 12:56:29 -07:00

analysis_server

A long-running process that provides analysis results to other tools.

The analysis server is designed to provide on-going analysis of one or more code bases as those code bases are changing.

Using the server

The analysis server is not intended to be used stand-alone, and therefore does not have a human-friendly user interface.

Clients (typically tools, such as an editor) are expected to run the analysis server in a separate process and communicate with it using a JSON protocol. The original protocol is specified in the file analysis_server/doc/api.html and Language Server Protocol support is documented in tool/lsp_spec/README.md.

Features and bugs

Please file feature requests and bugs at the issue tracker.