yoavbls / pretty-ts-errors

πŸ”΅ Make TypeScript errors prettier and human-readable in VSCode πŸŽ€
https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors
MIT License
13.14k stars 89 forks source link

Extension causes high cpu load #58

Closed mohammadgarmroodi closed 11 months ago

mohammadgarmroodi commented 1 year ago

:warning: Make sure to attach this file from your home-directory: :warning:file:///c%3A/Users/LENOVO/AppData/Local/Temp/yoavbls.pretty-ts-errors-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

yoavbls commented 1 year ago

I'm planning to address it soon by caching the formatted error messages, I hope it'll also resolve this: https://github.com/yoavbls/pretty-ts-errors/issues/36#issuecomment-1529845176

I'll update about it soon.

tfrijsewijk commented 1 year ago

I'm experiencing this as well on a moderately large codebase. My vscode is not showing any TypeScript hints for over a minute. Changes are hardly coming through.

Dou you have any idea what is causing the load? It should only format an error upon showing the dialog, why is it consuming so much during startup? On a small codebase there's no problem.

Thanks for your great work!

yoavbls commented 11 months ago

v0.5 just published with a new caching mechanism πŸ•ΊπŸΌ Try it out, it should solve these performance issues https://github.com/yoavbls/pretty-ts-errors/releases/tag/v0.5.0