Settings

Theme

Ask HN: Compiling VSCode project substantially faster with Panel closed

16 points by tmpfile 4 years ago · 6 comments · 1 min read


I recently noticed that my project builds substantially faster with the Panel closed (CTRL+J). It opens automatically on build and I closed it the other day and noticed a huge performance increase. I pretty much use default tsconfig.json configuration. Wondering if anyone else can recreate?

Timing with panel open: 19.86s Timing with panel closed: 4.60s

I filed an issue at https://github.com/microsoft/vscode/issues/160118

tmpfileOP 4 years ago

Wanted to add a little more detail and make the link accessible [0] which also shows the output from --extendedDiagnostics. The Panel is the window where the output from a build is shown [1]. It is displayed automatically on build. It's visibility can be toggled with CTRL+J (I'm on Linux) or from View > Appearance > Panel. When it's hidden the build is x5 faster with no other changes.

Wondering if anyone else can confirm faster builds with it hidden?

[0] https://github.com/microsoft/vscode/issues/160118

[1] https://code.visualstudio.com/docs/editor/tasks

rowanG077 4 years ago

My initial instinct: are your build artifacts indexed by the git plugin? Try git ignoring everything not relevant.

  • tmpfileOP 4 years ago

    Nope. It's only compiling relevant files. Nothing is output during the build. Can you confirm faster builds with the panel hidden too?

  • unsafecast 4 years ago

    How would that change with the state of the in-editor panel?

    • rowanG077 4 years ago

      Panel gets removed from DOM it unhooks the event handlers for showing the real-time status of git meaning they don't have fire at all. It's common for web apps to slow down when certain UI element react to an event that is emmited (much) faster then the UI can handle.

      • unsafecast 4 years ago

        That's a good point, but I'd expect that to influence output-heavy processes. I still don't see the connection to git.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection