cyrusfirheir / twee3-language-tools

[ VSCode extension ] Syntax highlighting and programmatic language tools for Twee 3, and Twine 2 storyformats.
https://marketplace.visualstudio.com/items?itemName=cyrusfirheir.twee3-language-tools
MIT License
47 stars 16 forks source link

Extension causes high cpu load #162

Open rinariwrites opened 2 months ago

rinariwrites commented 2 months ago

:warning: Make sure to attach this file from your home-directory: :warning:file:///var/folders/gm/b4hv31v15d54msy_vtr0m4440000gp/T/cyrusfirheir.twee3-language-tools-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

Tranberry commented 2 months ago

Do you have Auto Save turned on?

cyrusfirheir commented 2 months ago

Please attach the cpuprofile.txt file from your home directory. I need the profiled data to be able to see what went wrong where. The "author" mentioned in the wiki link you shared refers to the issue author, not extension author. I don't have access to your filesystem.

rinariwrites commented 2 months ago

Do you have Auto Save turned on?

Yes, I do! Would turning it off resolve this?

Please attach the cpuprofile.txt file from your home directory. I need the profiled data to be able to see what went wrong where. The "author" mentioned in the wiki link you shared refers to the issue author, not extension author. I don't have access to your filesystem.

Oops, sorry! I just sort of automatically clicked an "error found" message while looking at the live processes and it auto-generated the issue report. Hoping this is what you need! cyrusfirheir.twee3-language-tools-unresponsive.cpuprofile.txt

cyrusfirheir commented 2 months ago

While I couldn't pinpoint anything from the profile you (and @SjoerdHekking on the Discord) shared, I did make some changes and updated very old dependencies. Hopefully should be a better experience, but I'll let you guys be the judge of that.

Update to v0.27.0

rinariwrites commented 2 months ago

Hey, thank you so much, I'll give it a try! In either case, thanks for all the work you do on this! :)

zibbizor commented 1 month ago

I've been experiencing significant issues developing today, it got so bad I took some time to investigate what was going on.

Looking at the task manager, I've found VSCode eating 40% CPU on my 8C/16T system and memory usage skyrocketing to more than 3gb. At some point it would start freezing while scrolling up or down in twee files.

After disabling all plugins on VSCode and going through them one by one, I've been able to isolate this behavior to the T3LT extension. After reverting to version v0.26.1, the issue is gone. CPU usage has returned to 0-2% and memory to a constant 700mb.

I haven't finished investigating this yet to narrow it down further, but I feel the issue is worth a early heads-up.

Edit: Issue starts with version v0.27.3. Previous v0.27.x versions do not display this behavior.

felix9 commented 1 month ago

v0.27.5 fixes this for me

cyrusfirheir commented 1 month ago

@rinariwrites Could you check too? v0.27.5 should take care of the issue, but if you confirm we can close the issue.

rinariwrites commented 1 month ago

Testing now on v0.27.5, I no longer have the error caused by high CPU use in the "Running Extensions" view, and CPU use for the extension hovers around 20-40% on my Activity Monitor! I thought it might have been lower on v.27.0, like <10%, but so far I'm not experiencing any issues either way!