Closed xhpohanka closed 4 years ago
What kind of CPU do you have? Does the problem persist after ST restart? Does it happen right away after restart or after using ST for some time?
What kind of CPU do you have?
Intel(R) Core(TM) i7-8565U CPU
Does the problem persist after ST restart?
Yes
Does it happen right away after restart or after using ST for some time?
On my setup it is perfectly reproducible, the CPU is stressed whole time since starting ST. It goes back to normal when I add TrailingSpaces into ignored packages...
There is a update_interval
setting (by default set to 250ms) that you can try changing to something much higher just to confirm that it's that causing the issue.
It really seems that it is related. When setting update_interval
to 25000 I have a 20% peak on CPU usage each 25 seconds :)
I can see something like this with TS enabled:
So CPU usage jumps up and then slowly gets lower until it jumps up again. And that's over many seconds, with a default 250ms interval. It seems weird to me.
I see similar behavior as you - CPU usage peaks and then it is slowly decreasing, then peaks again. When there is no file opened CPU is low as well as with file with no syntax enabled.
TrailingSpaces settings is blank. I also tried to find if there is any interaction with other packages but it does not seem so.
FYI: Created ST issue for it https://github.com/sublimehq/sublime_text/issues/3353
I was also experiencing a continuous high CPU load in ST3. After trying a lot of things, I finally narrowed it down to this plugin. Setting a high update_interval (10s) seems to work, thanks
This is fixed in the latest dev builds of ST4 (see https://github.com/sublimehq/sublime_text/issues/3353) so I'm closing this issue also.
Unfortunately, it's not likely that ST3 will receive the same fix.
Just to be sure I understand, there's a bug in ST causing this, it's been fixed in the latest dev release, but the same fix won't be applied to the current stable release, and now the bug is closed?
Yes. The solution for ST3 users is to increase the update_interval
value to minimize the issue.
I guess I have to appreciate the honesty? :man_shrugging: Thanks @rchl.
@garymoon: reverting to e24719053fe6960a327591d2c48ccbd49684500d
fixed this issue for me. It's not ideal, but it works.
I see a high CPU usage (around 15-20%) with TrailingSpaces enabled, even when sublime is on background. My operating system is Arch Linux, sublime-text-dev package...