mylesmmurphy / prettify-ts

Prettify TypeScript: Better Type Previews
https://marketplace.visualstudio.com/items?itemName=MylesMurphy.prettify-ts
MIT License
181 stars 6 forks source link

Extension massively slowing down vsCode #21

Open locateAChris opened 1 month ago

locateAChris commented 1 month ago

This plugin is incredible, unfortunately it makes vsCode almost unusable. When trying to 'Rename Symbol' it was taking up to 20 seconds to respond, once this extension was disabled it is near instant. Hover information was also taking 5+ seconds to show.

Extension version: v0.0.17 VSCode Version: 1.84.2 Apple M1 Pro Mac Sonoma 14.1.1

mylesmmurphy commented 1 month ago

Hi @locateAChris! Thanks for bringing up this issue. Performance has been a continued struggle when developing this extension and I am always trying to improve it.

Would you mind sharing the type that is causing 5+ seconds on hover? Does this happen only on the first time you hover over something in a project, or anytime you hover over something even after the extension has fully loaded?

ColCh commented 1 month ago

Hi! really cool extension, thank you for it

I'm facing same issue

it's really slow on any project with playwright installed.

may be it's possible to incorporate some kind of logs with performance metrics? then we could easily report if anything is really broken

mylesmmurphy commented 1 month ago

Hi @ColCh and @locateAChris - With it's current implementation using ts-morph, unfortunately, there is nothing that can be done to improve the speed for the extension.

However, I am currently exploring re-engineering the extension as a TypeScript plugin. This should greatly improve the performance issues. I am currently trying to re-scope the project as part of this to determine which features should move forward.

If you don't mind me asking, what do you use the extension for? Do you ever use the sidebar, or is the hover preview the main appeal?

ColCh commented 1 month ago

Sure! Of course. Personally, I often find myself using it as hover preview. I personally never use sidebar for types, in my opinion it's too slow to check out and strikes me out of deep focus

mylesmmurphy commented 1 month ago

Hi @ColCh and @locateAChris Here is a link to try out the pre-release for the re-engineered project, which should include massive performance increases. If interested in testing out, simply download the vsix file under the release and install using the official VSCode instructions found here. If you try it out, please let me know if your performance issues are resolved with this!

https://github.com/mylesmmurphy/prettify-ts/releases/tag/v0.1.0-alpha

inoyakaigor commented 1 month ago

using it as hover preview. I personally never use sidebar for types, in my opinion it's too slow to check out and strikes me out of deep focus

double it