vscode-language-renpy
vscode-language-renpy copied to clipboard
Slow Performance (Intellisense primarily)
Type: Bug
The Ren'Py VSCode addon has been faulty for a while now, since the last major update (the one that changed some text colors, I believe.)
The biggest harm I've felt is the now-unusably slow IntelliSense autocomplete results, which is lamentable. That is a feature I use constantly, and it's hampering my work-flow.
It also has an "Unresponsive" warning on the 'Running Extensions' window.
Extension version: 2.2.2/2.3.6 (both seem to have the same issue) VS Code version: Code 1.80.0 (660393deaaa6d1996740ff4880f1bad43768c814, 2023-07-04T15:06:02.407Z) OS version: Windows_NT x64 10.0.19044
CPU is a Ryzen 7 3800x.
That's unfortunate. To figure out the exact cause we'll need some help though. If it's taking a long time to complete an action in your project, it's likely that some part of your codebase triggers a bug in the extension. I've not ran into performance issues in my test projects.
We'll need a cpu profile session from your project to see what part of the code is causing the performance bottleneck. You can find how to creat one on this page:
https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load
No sorry, I should have specified. If you follow the gif, they use the load function of the profiler. But that's what we need to do on our end.
If you could do the same steps as shown in the gif, but choose the option to make a new profile.
When you start a session, vscode will record what the code is doing, so make sure you do the actions that will trigger the slowdown.
Then you can stop the session and upload the results. We should then be able to see the parts of the code that take a long time in your project
I actually did that. Started recording, then tried auto-completing one variable (which gave me the expected slowdown), then stopped once it found the variable name.
The file I sent was the cpuprofile log generated from that. Just remove the '.txt', Github doesn't allow uploading the .cpuprofile format for some reason. That should let you load it on the profiler (I tested it myself, though I have no clue what the results mean 😪)
Hmm, well the profile you've uploaded doesn't go through any of our source code. It only mentionedworkbench.desktop.main.js
.
Are you sure it is our plugin and not something else?
And/or are you sure you triggered the slowdown while you made the cpu profile?
See if starting vscode with --disable-extensions
makes a difference.
The old issue here might give you some other things to try: https://github.com/microsoft/vscode/issues/159004
Huh... The file I sent was a different kind of recording then. That was straight from the devtools (probably the JS Profiler). Just tried recording from the "Running Extensions" window instead, see if this one shows anything relevant.
That one does show different information. I'll have a look after work
Seems like rolling back to 2.0.16 fixed the slowness issues. Very likely to be a 2.2.x thing. Not only do Intellisense results show up instantly, but saving times are faster too. These were very sluggish in the newer update.
Hm, yes alright. That's enough proof then. I'll try to see if I can find the issue/what I can do about it.
For me it's constantly hangs on "Initializing Ren'Py static data" right after vscode startup. Can sit like that for half an hour easily. And vscode complains about "very slow last operation" from extension. Even search for files doesn't work properly until that intialization ends.
No problems if extension is disabled.
For me it's constantly hangs on "Initializing Ren'Py static data" right after vscode startup. Can sit like that for half an hour easily. And vscode complains about "very slow last operation" from extension. Even search for files doesn't work properly until that intialization ends.
No problems if extension is disabled.
Ah yes, I was hoping that issue would be fixed with the latest update, but clearly not.
Would you be able to figure out what file exactly is causing the issue? It should be one (or more) specific files in your project.
If you'd be able to share it with me (privately if necessary), then I can debug the issue and fix it.
I met the same problem when I was starting VSC. Please help me check. exthost-13f03d.cpuprofile.txt
Same issue on v2.2.2 and pre-release v2.3.6
vscode complains about "very slow last operation" from extension. Even search for files doesn't work properly until that intialization ends.
extension causes all other extensions to fail. they just hang after "intilization"
No problems if extension is disabled.
ditto
Edit: Attaching my cpu profile, unsure of which is the right one-- sorry I'm extremely new at all this.
LuqueDaniel.languague-renpy-unresponsive.cpuprofile.txt exthost-407ebd.cpuprofile.txt
Yep, I can confirm, the extension does not work, stuck on loading renpy static data, and until it is uninstalled it disables intellisense entirely