TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

Fix errorPusher Performance #1556

Closed aminya closed 4 years ago

aminya commented 4 years ago

takes out the loop invariant code

This snippet of the code is called tens or hundreds of times. Previously the number was multiplied by the number of diagnostics! If you can take this out from this nested loop, it would be better. image

After

now after this PR pushError itself takes this much time, which is ~50ms faster in each call image

Before

Previously errorPusher took this much: image

lierdakil commented 4 years ago

Something similar done in v13.9.2. Good catch.