withastro / language-tools

Language tools for Astro
MIT License
272 stars 54 forks source link

Astro extension is slow since 1.94 #969

Closed Princesseuh closed 1 month ago

Princesseuh commented 1 month ago

Type: Performance Issue

  1. Install the Astro extension (any version of it exhibit the same issue)
  2. Open a sufficiently large Astro project, for example, my website.
  3. Open any .astro file, for example, src/pages/index.astro
  4. Try getting completions in the --- part of the file, for example, writing console. to get a completion for console.log 5: Result: It's pretty much instant on 1.93.1, but is significantly delayed on 1.94.2.

Extension version: 2.15.2 VS Code version: Code 1.94.2 (Universal) (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z) OS version: Darwin arm64 23.1.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (8 x 2400)| |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
webnn: disabled_off| |Load (avg)|5, 3, 3| |Memory (System)|16.00GB (0.45GB free)| |Process Argv|--crash-reporter-id 7ccc9488-b32b-4432-8ee7-555ae4c97229| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 48 197 28916 code main 1 82 28919 gpu-process 0 33 28920 utility-network-service 3 344 28922 window [1] (index.astro — erika.florist — Nothing) 1 98 28931 shared-process 1 0 29005 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 8 131 28938 extensionHost [1] 0 442 28941 electron-nodejs (server.js ) 0 66 28994 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=28938 0 98 28995 electron-nodejs (tsserver.js ) 0 98 28996 electron-nodejs (tsserver.js ) 0 98 28997 electron-nodejs (typingsInstaller.js typesMap.js ) 2 66 28939 fileWatcher [1] ```
Workspace Info ``` | Window (index.astro — erika.florist — Nothing) | Folder (erika.florist): 19129 files | File types: json(2032) timestamp(1743) o(1688) d(1586) rmeta(1275) | rlib(791) png(729) webp(383) html(344) mdoc(309) | Conf files: settings.json(2) package.json(2) tsconfig.json(2) | github-actions(1) project.json(1); ```
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementst:30995554 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 jg8ic977:31013176 dvdeprecation:31068756 dwnewjupyter:31046869 2f103344:31071589 impr_priority:31102340 nativerepl1:31139838 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31132770 nativeloc1:31134641 wkspc-ranged-t:31151552 cf971741:31144450 autoexpandse:31146404 iacca2:31156134 notype1cf:31157160 5fd0e150:31155592 dwcopilotcf:31160514 iconenabled:31158251 ```