platform: windows 7 x64
sublime text version: sublime_text_build_4180_x64
this issue may be relate to syntax engine (tested with javascript files).
- file a.js: simple file with content generated by default ‘for’ snippet:
for (var i = Things.length - 1; i >= 0; i–) {
Things[i]
}
- file main.js: come from cpptools of Visual Studio Code: you can find it as “\cpptools\dist\src\main.js”, the file size is ~5.39MB; (can be extracted from cpptools-windows-x64.vsix)
- file test.js: repeat the content of a.js to match the size of main.js.
reproduce:
- download https://www.sublimetext.com/download_thanks?target=win-x64-portable;
- launch sublime_text.exe to let it initialize something (e.g. create package caches);
- close and re-launch sublime, use taskmgr.exe to record its commit memory usage, this is ~22.5 MB in my laptop;
- then open a.js, record again the commit memory usage: ~25.8 MB;
- then open test.js, the memory usage will be: ~54 MB;
- close test.js, see that the memory usage will be: ~24.4 MB;
- close and re-launch sublime, record commit memory usage for this fresh instance: ~23 MB;
- then open a.js, memory usage will be: ~23.6 MB;
- then open main.js, memory usage will be: ~124.6 MB;
- finally close main.js, the memory usage remains at: ~122.3 MB;
the expected behavior is:
a) the memory usage return to <25 MB after close main.js;
b) the memory usage for syntax-highlighting of main.js is too high compared to test.js;