1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/tests
Nathan Whitaker 36d877be4a
perf(lsp): Cache semantic tokens for open documents (#23799)
VScode will typically send a `textDocument/semanticTokens/full` request
followed by `textDocument/semanticTokens/range`, and occassionally
request semantic tokens even when we know nothing has changed. Semantic
tokens also get refreshed on each change. Computing semantic tokens is
relatively heavy in TSC, so we should avoid it as much as possible.

Caches the semantic tokens for open documents, to avoid making TSC do
unnecessary work. Results in a noticeable improvement in local
benchmarking

before:
```
Starting Deno benchmark
-> Start benchmarking lsp
   - Simple Startup/Shutdown 
      (10 runs, mean: 383ms)
   - Big Document/Several Edits 
      (5 runs, mean: 1079ms)
   - Find/Replace
      (10 runs, mean: 59ms)
   - Code Lens
      (10 runs, mean: 440ms)
   - deco-cx/apps Multiple Edits + Navigation
      (5 runs, mean: 9921ms)
<- End benchmarking lsp
```

after:
```
Starting Deno benchmark
-> Start benchmarking lsp
   - Simple Startup/Shutdown 
      (10 runs, mean: 395ms)
   - Big Document/Several Edits 
      (5 runs, mean: 1024ms)
   - Find/Replace
      (10 runs, mean: 56ms)
   - Code Lens
      (10 runs, mean: 438ms)
   - deco-cx/apps Multiple Edits + Navigation
      (5 runs, mean: 8927ms)
<- End benchmarking lsp
```
2024-05-15 01:51:48 +00:00
..
config chore: move test_util/std to tests/util/std (#22402) 2024-02-13 09:22:49 -07:00
ffi chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
integration perf(lsp): Cache semantic tokens for open documents (#23799) 2024-05-15 01:51:48 +00:00
napi chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
node_compat test: fix node_compat_test (#23446) 2024-04-19 01:42:18 +02:00
registry fix(node): better cjs re-export handling (#23760) 2024-05-10 09:55:20 -04:00
specs chore: fix flaky rejection_handled_web_process (#23817) 2024-05-14 23:51:51 +00:00
testdata chore: fix flaky rejection_handled_web_process (#23817) 2024-05-14 23:51:51 +00:00
unit fix: Add missing "junction" type for SymlinkOptions.types (#23756) 2024-05-14 15:06:21 +02:00
unit_node fix(node): stub AsyncResource.emitDestroy() (#23802) 2024-05-15 00:42:43 +02:00
util perf(lsp): Cache semantic tokens for open documents (#23799) 2024-05-15 01:51:48 +00:00
wpt fix(ext/web): update ongoing promise in async iterator return() method (#23642) 2024-05-13 23:34:25 +00:00
Cargo.toml chore(task): various small refactorings (#23793) 2024-05-13 22:55:14 +00:00
lib.rs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
README.md chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00

Deno Integration Tests