Compiling VSCode project substantially faster with Status Bar and Panel hidden

3 min read Original article ↗

(edited to add both the STATUS BAR and PANEL must be hidden for speed increase)

I recently noticed that my project builds substantially faster with the Panel and Status Bar hidden. I hid the Panel 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

It appears the Parse Time, Bind Time and Check Time are much faster with Panel and Status Bar closed.

The steps I use to build:

  • CTRL + SHIFT + B
  • Select "Build Project"
  • Panel opens by default
  • Close Panel with CTRL + J

tasks.json

{
"version": "2.0.0",
"tasks": [
  {
    "label": "Build Project",
    "type": "shell",
    "group": "build",
    "problemMatcher": ["$tsc"],
    "command": [
      "tsc -b --extendedDiagnostics project/tsconfig.json"
    ]
  ]
}

Output of --extendedDiagnostics with Panel open (edited same file to recreate build):

Files:                         158
Lines of Library:            27205
Lines of Definitions:        37867
Lines of TypeScript:         21539
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Nodes of Library:           118033
Nodes of Definitions:        94131
Nodes of TypeScript:         61644
Nodes of JavaScript:             0
Nodes of JSON:                   0
Nodes of Other:                  0
Identifiers:                 96568
Symbols:                     66162
Types:                        9508
Instantiations:               4692
Memory used:               118831K
Assignability cache size:     1584
Identity cache size:            59
Subtype cache size:            109
Strict subtype cache size:     350
I/O Read time:               0.10s
Parse time:                  5.02s          <<
ResolveModule time:          0.30s          <<
ResolveTypeReference time:   0.04s          <<
Program time:                5.97s          <<
Bind time:                   2.38s          <<
Check time:                 11.32s          <<
transformTime time:          1.19s          <<
commentTime time:            0.00s
printTime time:              0.19s
Emit time:                   0.19s
Source Map time:             0.01s
I/O Write time:              0.00s
Total time:                 19.86s 

When Panel closed:

Files:                         158
Lines of Library:            27205
Lines of Definitions:        37867
Lines of TypeScript:         21539
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Nodes of Library:           118033
Nodes of Definitions:        94131
Nodes of TypeScript:         61644
Nodes of JavaScript:             0
Nodes of JSON:                   0
Nodes of Other:                  0
Identifiers:                 96568
Symbols:                     66162
Types:                        9508
Instantiations:               4692
Memory used:               132751K
Assignability cache size:     1584
Identity cache size:            59
Subtype cache size:            109
Strict subtype cache size:     350
I/O Read time:               0.02s
Parse time:                  1.34s          <<
ResolveModule time:          0.06s          <<
ResolveTypeReference time:   0.01s          <<
Program time:                1.55s          <<
Bind time:                   0.74s          <<
Check time:                  2.27s          <<
transformTime time:          0.20s          <<
commentTime time:            0.00s
printTime time:              0.04s
Emit time:                   0.04s
Source Map time:             0.00s
I/O Write time:              0.00s
Total time:                  4.60s