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 15 forks source link

With 300+ twee files, VS Code becomes very slow with this extension activated when a new file is added or a file/folder renamed #126

Open WakeReality opened 1 year ago

WakeReality commented 1 year ago

I can't give a reproduction yet, but I wanted to raise the issue in case others ran into it. I'm on Ubuntu 22.04 with 16GB of RAM and a pretty high power 12-core CPU... and I've upped all my kernel file parameters.

We are talking like 45 seconds or longer to add a file using the VS Code GUI or rename a file with same. I have no other extensions but this one from default, and disabling this extension fixes the issue.

The other symptom is that some files don't show the color highlighting of passage names and such, like it crashed/stuck somewhere and doesn't get to process all the files.

Maybe I can try to make a script that generates 500 .twee files with random passages in 50 different folders to create a reproduction of the issue.

cyrusfirheir commented 1 year ago

We haven't stress-tested the extension on projects that large. The did do some work on large single-files, but for a large number of multiple files, there's still room for improvement.

A script to reproduce would be welcome!

WakeReality commented 1 year ago

I did make a script that generated 50 folders of 10 twee files each with test content in them, but I couldn't track down the issue.

I think I found that if one of my passages has a improper syntax link <<custommacro>>hello<</custommacro> With only one ">" at end of tag, it causes issue (the extension gets stuck and the slow file creation/rename). But isolating the mistake to one file doesn't always cause it, so I'm trying to find the full pattern.