vscode_deno icon indicating copy to clipboard operation
vscode_deno copied to clipboard

Formatting is very slow

Open scarf005 opened this issue 11 months ago • 4 comments

Describe the bug

To Reproduce

  1. set "editor.formatOnSave": true in vscode config
  2. ctrl+s to save a file

Expected behavior

formatting is instantly finished

Screenshots

https://github.com/user-attachments/assets/6afbcb91-569a-4ac7-891c-070d1ba13f76

invoking ctrl+s with formatonsave turned on, it takes noticable delay after whitespace gets trimmed

Versions

vscode: 1.96.2 deno: deno 2.1.4 (stable, release, x86_64-unknown-linux-gnu) extension: 3.43.2

scarf005 avatar Jan 04 '25 05:01 scarf005

@scarf005 Can you try with deno upgrade --canary? This might be improved by recent work on cancellation response-time.

nayeemrmn avatar Feb 11 '25 20:02 nayeemrmn

@nayeemrmn Current version:

deno 2.1.10+56f67b5 (canary, release, x86_64-unknown-linux-gnu)
v8 13.4.114.9-rusty
typescript 5.7.3

it has become even slower, like extremely slow. not only the formatter is slow but the entire toolchain is slow. tested on latest https://github.com/denoland/deno_std

https://github.com/user-attachments/assets/31d11418-c245-4663-abb9-c613590e8939

scarf005 avatar Feb 16 '25 14:02 scarf005

@scarf005 For deno_std, try running deno check _tools/check_circular_package_dependencies.ts. This seems to be caused by uncached npm deps slowing down the resolver when there's a lockfile (bug).

If you open the output panel while the lag is happening it should be spamming about that.

nayeemrmn avatar Feb 25 '25 16:02 nayeemrmn

@scarf005 Please try again with deno upgrade --canary, this should have improved with https://github.com/denoland/deno/pull/28302. If not share the output panel content while it's delaying.

nayeemrmn avatar Mar 01 '25 23:03 nayeemrmn

Many perf improvements since, closing for now.

nayeemrmn avatar Sep 30 '25 18:09 nayeemrmn