I just upgraded to ST4 on my mac. And now just going to the sidebar often produces a spinning wheel for a couple seconds for no apparent reason, as well as other actions doing the same. Any clue on what is causing this? It makes it almost unusable. For example is it necessary blow away previously installed packages?
ST4 Mac slowness
Thanks for the suggestion. I either didn’t know or had forgotten about safe mode. No, the problem does not appear to happen in that mode.
I’d suggest using the "ignored_packages"
setting to narrow down which plugin is causing your slowdown.
I suspect it would just be most straightforward for me to remove all packages and reinstall one at a time. I don’t have a gigantic number of them.
I tried ‘safe’ mode and it didn’t help. I am also on a Mac (intel - Big Sur - 11.6.1).
My symptoms are, when ST first starts there are no issues. It can take anywhere from a few minutes to half an hour before the symptom begins.
Once the symptom kicks in, ST just seems to pause processing for a few seconds typically up to around ten seconds but sometimes even more. This gives you kind of a ketchup affect when typing.
Once the slowness symptom starts, it does not go away. Even just tabbing to the app, ST took 5 seconds to become active and responsive (hadn’t used ST for a week or so, it was open on the desktop).
Killing ST and restarting lets it initially work ok until the slowness bug kicks in.
At this point, I can’t use ST seriously anymore. I have Build 4121 installed. I will update when there is an update available to check out if this issue is resolved, but if it does not happen within a few update cycles, I probably will just put ST to rest.
I can believe this issue might be a combination of latest ST code/MacOS version/MacBook hardware. I do see weird slowdowns very, very occasionally in other apps but nothing like in ST.
I have not seen this happening at all in VS Code on my machine.
What hardware are you using? Does it happen if you disable hardware acceleration?
MacBook Pro (16-inch, 2019)
2.4 Ghz, 8-Core Intel Core i9
32 GB 2667 MHz DDR4
Graphics: AMD Radeon Pro 5500M 4 GB
I do believe I tried the configuration setting for disabling HW acceleration.
I can look if it is still set, what is the location of that config file?
% cat ~/Library/Application\ Support/Sublime\ Text/Packages/User/Preferences.sublime-settings
{
“font_size”: 15,
“ignored_packages”:
[
“Vintage”,
],
“hardware_acceleration”: “none”,
}
Is it possible to use GDB (or similar) to get a stackdump of what ST is doing during theses pauses?
Do you think that would help?
To give closure on my case, removing Anaconda ended the slowness problems, I installed instead the Language Server stuff for. Python. I eventually got it working, but it was painful without a full set of instructions. E.g., where is the definitive definition of which executable to use. Oh, I have to install that too? And the other thing? And so forth. MagicPython didn’t work because of a regex error. Then syntax highlighting failed, and I had to figure out how to get it working again. If I had only known, I might not have upgraded.
We ship debug symbols so using lldb would certainly help, but on macOS you can only attach a debugger to self-signed executables so it’s not as simple as running the debugger.
If the pause is slow enough an easy way to get diagnostic information is to use Activity Monitor, click on ST and under the … button select “Sample Process”.
I was able to do this but it seems quite chatty. Can I assume it would be much easier to analyze the sample output if I were running ST in ‘safe’ mode?
I don’t see that reducing it at all. It’s a dump of all threads from the application, which is always going to be quite a bit of data.
FWIW since there are symbols in the build, you should be able to get profiling information via XCode Instruments in Time Profiler mode even for a signed app (I just did a quick test and was able to attach it to ST4). This might be more informative than just a stackdump, depending on what’s happening.
If you are using a m1 or latest MacOS version, make sure you turn off low powered mode. It will slow down things, especially on startup if you are using it against a medium size or more project.
See Low Power Mode Section From Apple Support
Thanks for sending the sample. It looks like it’s spending its time collecting files for indexing. How many files do you have open in the side-bar? Does it improve if you use "index_skip_unknown_extensions": false
?
Build 4125 has been a MAJOR improvement for me. I just want to say thanks because for many months typing felt sluggish, specially when autocompletion pop-ups showed up. Not anymore.
Just that, most of us only appear around these corners to complain, but hey, what’s fair is fair: WELL DONE.