1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/cli
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
..
args fix(emit): regression - keep comments in emit (#23815) 2024-05-14 22:01:31 +00:00
bench chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
cache refactor(lsp): unify caching into LspCache (#23746) 2024-05-09 20:22:27 +01:00
js chore: update references to deno_std to use JSR (#23239) 2024-04-10 17:26:35 -04:00
lsp perf(lsp): Cache semantic tokens for open documents (#23799) 2024-05-15 01:51:48 +00:00
napi chore: cleanup unused dependencies (#23787) 2024-05-13 14:23:39 -07:00
npm fix(npm): make tarball extraction more reliable (#23759) 2024-05-14 14:26:48 -04:00
ops chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
schemas feat(cli): add support for jsxImportSourceTypes (#23419) 2024-04-30 18:12:35 +00:00
standalone fix(compile): relative permissions should be retained as relative (#23719) 2024-05-06 19:21:58 -04:00
tools fix(publish): always include config file when publishing (#23797) 2024-05-14 18:15:43 +00:00
tsc fix: Add missing "junction" type for SymlinkOptions.types (#23756) 2024-05-14 15:06:21 +02:00
util fix(npm): make tarball extraction more reliable (#23759) 2024-05-14 14:26:48 -04:00
auth_tokens.rs fix(cli): Add IP address support to DENO_AUTH_TOKEN (#22297) 2024-02-06 19:45:40 +01:00
build.rs fix: upgrade TypeScript from 5.4.3 to 5.4.5 (#23740) 2024-05-08 13:54:56 -04:00
Cargo.toml fix(doc/publish): support expando properties (#23795) 2024-05-14 00:00:33 +00:00
cdp.rs refactor(tools/repl): reorganize code (#21810) 2024-01-05 16:14:58 +01:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
emit.rs fix(publish): support import equals (#23421) 2024-04-17 19:15:02 +00:00
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
errors.rs fix: upgrade to deno_ast 0.33 (#22341) 2024-02-09 01:40:26 +00:00
factory.rs FUTURE: deno install changes (#23498) 2024-05-08 12:34:46 -07:00
file_fetcher.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
graph_util.rs refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764) 2024-05-13 17:55:31 +01:00
http_util.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
integration_tests_runner.rs chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00
js.rs chore(cli): remove problematic snapshot test (#22722) 2024-03-05 19:11:33 -07:00
jsr.rs refactor(lsp): reland move resolver fields to LspResolver (#23685) 2024-05-07 03:20:15 +01:00
main.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
mainrt.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
module_loader.rs FUTURE: deno install changes (#23498) 2024-05-08 12:34:46 -07:00
node.rs feat(runtime): Allow embedders to perform additional access checks on file open (#23208) 2024-04-19 18:12:03 -06:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764) 2024-05-13 17:55:31 +01:00
version.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
worker.rs fix(runtime): output to stderr with colors if a tty and stdout is piped (#23813) 2024-05-14 17:32:09 -04:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.