deno/tests/integration
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
..
bench_tests.rs chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
bundle_tests.rs chore: fix typos (#22677) 2024-03-04 14:28:57 +00:00
cache_tests.rs chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
check_tests.rs chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
compile_tests.rs chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
coverage_tests.rs fix(cli): panic with deno coverage (#23353) 2024-05-13 23:18:38 +02:00
doc_tests.rs chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
eval_tests.rs chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00
flags_tests.rs chore: move more tests away from itest (#22909) 2024-03-15 15:46:51 -04:00
fmt_tests.rs fix(publish): make include and exclude work (#22720) 2024-03-07 20:16:32 -05:00
info_tests.rs chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
init_tests.rs feat(init): use jsr specifier for @std/assert (#23073) 2024-03-27 18:51:52 +01:00
inspector_tests.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
install_tests.rs feat(install): require -g / --global flag (#23060) 2024-03-27 23:45:57 +01:00
js_unit_tests.rs refactor(ext/tls): Implement required functionality for later SNI support (#23686) 2024-05-09 10:54:47 -06:00
jsr_tests.rs chore: add tests for moduleGraph2 (#23603) 2024-04-29 14:09:58 -04:00
jupyter_tests.rs fix(lsp): Pass diagnostic codes to TSC as numbers (#23720) 2024-05-06 23:54:52 +00:00
lint_tests.rs chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
lsp_tests.rs perf(lsp): Cache semantic tokens for open documents (#23799) 2024-05-15 01:51:48 +00:00
mod.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
node_compat_tests.rs fix(ext/node): dispatch beforeExit/exit events irrespective of listeners (#23382) 2024-04-16 13:45:41 +00:00
node_unit_tests.rs chore: fix flaky rejection_handled_web_process (#23817) 2024-05-14 23:51:51 +00:00
npm_tests.rs chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
pm_tests.rs fix(cli): avoid deno add and deno vendor errors when deno.json is empty (#23439) 2024-04-18 15:48:15 -04:00
publish_tests.rs chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
repl_tests.rs refactor(lsp): Have JS drive TSC event loop in LSP (#23565) 2024-05-09 13:49:10 -07:00
run_tests.rs chore(tests): increase repl timeout on ci (#23812) 2024-05-14 15:59:32 -04:00
shared_library_tests.rs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
task_tests.rs feat(task): support running npm binary commands in deno.json (#23478) 2024-04-20 20:13:46 -04:00
test_tests.rs chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
upgrade_tests.rs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
vendor_tests.rs chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
watcher_tests.rs chore: maybe make fmt_check_all_files_on_each_change_test less flaky (#23704) 2024-05-05 18:09:45 -04:00
worker_tests.rs refactor(tests): move worker_threads itests to spec tests (#23648) 2024-05-03 05:52:47 +00:00