VS Code extension slows down the start-up
See original GitHub issueHi, Thank you so much for the work you’ve put in unocss. Currently the VS Code extension adds 2 seconds delay when the editor is opened or when the extension host is restarted. Here’s the debug log:
INFO UNRESPONSIVE extension host: starting to profile NOW
workbench.desktop.main.js:602
INFO UNRESPONSIVE extension host: received responsive event and cancelling profiling session
ERR Cannot access '_require2' before initialization: ReferenceError: Cannot access '_require2' before initialization
at C://node_modules/.pnpm/vite@3.0.2/node_modules/vite/dist/node/chunks/dep-1513d487.js:44:47
at jiti2 (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:5544:15)
at C://node_modules/.pnpm/vite@3.0.2/node_modules/vite/dist/node/index.js:1:3263
at jiti2 (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:5544:15)
at C:\\node_modules\.pnpm\@sveltejs+vite-plugin-svelte@1.0.1_svelte@3.49.0+vite@3.0.2\node_modules\@sveltejs\vite-plugin-svelte\src\utils\id.ts:4:1
at jiti2 (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:5544:15)
at c://__unconfig_vite.config.js:5:25
at jiti2 (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:5544:15)
at loadConfigFile (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:65144:11)
at Object.load (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:65080:24)
at loadConfig (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:65206:18)
at reloadConfig (c:\\.vscode\extensions\antfu.unocss-0.44.5\dist\index.js:65231:20)
workbench.desktop.main.js:602
WARN UNRESPONSIVE extension host: 'antfu.unocss' took 90% of 2817.106ms
{ "id": "antfu.unocss", "total": 2543432, "percentage": 90
},{ "id": "gc", "total": 190508, "percentage": 7
},{ "id": "program", "total": 702, "percentage": 0
},{ "id": "self", "total": 74949, "percentage": 3
},{ "id": "vscode.git", "total": 4772, "percentage": 0
},{ "id": "vscode.json-language-features", "total": 1707, "percentage": 0
}
I included the cpu profiling, but it’s very huge I think the extension made nearly 70k ticks I removed all unrelated, and shortened strings so it’s 13mb now.
Thank you so much. exthost-710089.zip
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Here's How to Make VSCode Faster
Check for slow-starting extensions ... To open the Command Palette, use the shortcut for your platform: ... Once you hit enter, you will...
Read more >Is Your VS Code Extension Slow? Here's How to Speed it Up!
One possible cause is the number of files or the size of the extension. Some extensions have so much functionality in them that...
Read more >Extension issue: Slow startup - microsoft/vscode-python - GitHub
Judging from the CPU profile you uploaded, the slow startup you're experiencing doesn't seem to come from the Python extension, but from Chrome ......
Read more >How to make VS Code load faster with a little bit ... - Mike Bifulco
Have you noticed that your favorite IDE has been slow to load lately? Try removing these before losing hope.
Read more >VS Code Performance – How to Optimize Visual Studio Code ...
This extension will be activated sometime after VS Code starts up. This is like the * activation event, but it will not slow...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I will do when I have time then share it here. You can close this until I ask for reopening, currently I have a tight deadline, so I’ll make the reproduction soon,
By the way the CPU profiling has the chain of functions and how many times that function ticked
Seems to be good in version 0.45.5