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

TypeScript LSP frequently crashes on large project when Prettify TS extension enabled #18

Open ssalka opened 3 months ago

ssalka commented 3 months ago

Type: Bug

I noticed my TS LSP being very slow and repeatedly crashing when I try to jump to definition / cmd+click, and did an extension bisect to find that the Prettify TS extension is contributing to this issue. With the extension disabled, the LSP is quick to start up and doesn't crash

Extension version: 0.0.17 VS Code version: Code 1.87.2 (Universal) (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:21:31.043Z) OS version: Darwin arm64 23.2.0 Modes: Unsupported

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|6, 6, 6| |Memory (System)|64.00GB (4.75GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
mylesmmurphy commented 2 months ago

Hi @ssalka! Thanks for bringing this to my attention. Would you mind sharing which type(s) cause the extension to crash?

ssalka commented 2 months ago

@mylesmmurphy thanks for your response! Unfortunately there are no types in particular that I know cause this, it happens at various times when working in different pieces of code (we have a large monorepo with some 30k+ line codegen files for graphql types).

My mind jumps to the size of the project (+large files in it) as a contributing factor, seems TS is sorta pushed to the limit overall.

mylesmmurphy commented 1 month ago

Hey @ssalka! Prettify TS is currently being completely re-engineered, 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