Sublime Forum

Sublime Text 3 is Slow

#1

So i have been having issues with ST3 for a little while. It has this tendency to be ungodly slow. I run windows 8.1 but i found that it helps significantly if i run in windows 7 compatibility mode which is strange.

My main problem however is whenever i switch sublime to the foreground app(or just give it focus after not being my focus.) it chugs for a good 5-10 seconds. This is particularly annoying sense i run two monitors and it chugs if is switch between sublime windows. By chugs i means runs really slowly.

These two things might be a related items. If I select some text(constantly changing the amount i have selected) sublime chugs up to 20-30% cpu utilization which is very strange. Also if I have too many apps open sublime seems to be pushed to the background and get very little cpu time. Even if it is my foreground app. Theses priority problems have really made sublime unusable. I really really don’t wanna switch to a different text editor but if they aren’t address i kinda have to. especially sense i bought sublime like 2 months ago. These problems have been around for like 10 updates sense i switched.

0 Likes

#2

Are you sure the problem isn’t related to a plugin? If one of your plugins is leaking memory or stuck in a loop that’ll result in what you describe. Try moving groups of your plugins to “ignored_packages”. Failing that, try a portable install without any plugins.

Which build are you running… the latest dev build?

Using the dev builds I’m not seeing what you describe here. Although I’m not running Windows 8.x I don’t see an obvious reason why this would make a difference.

1 Like

#3

list form so its short

  1. I have tried with no addons. Same problem. Plus i use very popular plugins only. And only like 4 them. if they where the problem and i was messing up turning them off someone else would probably also report on in.
  2. I am running the latest dev build on windows 8.1 64 bit.
  3. the version of Sublime i am running is windows 64 bit. I am going to try the 64 bit portable version now.
  4. I have a windows 7 machine and i dont see these problems either. But my main work machine is windows 8.1 and i am not changing my OS. I believe the problem is probably sublime’s background mode is not really background. That is to say that sublime continues to try and queue up work but it get very little cpu time so when i switch back to sublime it has a bunch of work to catch up on. Or at least that is what it feels like.
  5. sublime’s memory utilization never goes past 200 mb. which for how many files i have open doesn’t seem super unreasonable.

Something strange to note is that if i run ST3 in windows 8.1 64bit without compatibility mode set to win7 it never passes 5% cpu utilization. Which would be nice if it actually rendered more then 1 frame every second.

0 Likes

#4

Please PM me if you find a solution. For now I work around thing by turning off windows defender and antivirus (no other apps struggle with defender/antivirus, so this is an ST3 problem)

0 Likes

#5

Switching to portable version seemed to help a bit but eventually it still has the same problem. Also I can’t turn off windows defender because I use this at work and I have to have a virus scan.

0 Likes

#6

Perhaps Jon can take a look to see if there is some issue specific to Win 8.1. Does the problem go away if you disable indexing?

0 Likes

#7

I noticed this on 8.0 and 8.1 and today I checked Win 7. All 64-bit, all with Defender and antivirus.

All have the problem, and it seems to go away if indexing is turned off. Also, turning off Defender and antivirus completely “solves” the problem. Just weird?

0 Likes

#8

I just turned indexing off we will see if that helps. Is the indexing feature use for auto correct in C++? does it do anything in C++? if it doesn’t i think this will be a solution i can live with.

0 Likes

#9

Kaniken’s post suggests that the problem is connected to Defender and/or the AV program in use. ST’s indexer scans all the project files to build its database for symbol lookup so that you can jump to func definition etc… It seems to work on several threads to achieve its ends quickly and works with most languages. Perhaps a good workaround is to configure the AV/Defender to skip any files requested for opening by sublime.exe. How you do this will depend on your AV, and I’m not sure with Defender; I use neither.

It may be that either or Defender 8.1 is blocking sublime more vicously than Defender 7 or

0 Likes

#10

[quote=“qgates”]Kaniken’s post suggests that the problem is connected to Defender and/or the AV program in use. ST’s indexer scans all the project files to build its database for symbol lookup so that you can jump to func definition etc… It seems to work on several threads to achieve its ends quickly and works with most languages. Perhaps a good workaround is to configure the AV/Defender to skip any files requested for opening by sublime.exe. How you do this will depend on your AV, and I’m not sure with Defender; I use neither.

It may be that either or Defender 8.1 is blocking sublime more vicously than Defender 7 or [/quote]

I just found that indexing also doesn’t work with my online back up program. Basically ST3 is useless for me right now :frowning: It’s not like i am going to turn off AV and backup to edit files.

My theory is that ST3 goes haywire if external processes briefly need to lock files.

I downloaded 2.0.2 and it works fine, but I suppose ST2 doesn’t do indexing at all?

0 Likes

#11

This shouldn’t be an issue if your backup software is using the volume shadow copy service, which it should be to avoid such issues.

ST3 shouldn’t have a problem accessing files in a read-only fashion that are open by other processes, perhaps Jon could look into that. But I and most others don’t appear to have a problem with ST3 in this regard, suggesting that this is an edge-case with certain programs. It could also be that certain things have changed in the Win8.x. Have you seen any of these issues in Win7?

0 Likes

#12

I had some different weirdness with build 3056. Cured it by:

  • Package Control:Upgrade/Overwrite All Packages

  • Restart ST3

As a wild guess this might help.
My weirdness was auto-completion went away.

0 Likes

#13

On a big project, with a lot of files, I’m seeing the same problem on OS X Mavericks. Fans blowing and all. Not in ST2, but it’s there in ST3, build 3047. For instance, when I rename a folder containing a lot of markdown files, sublime becomes unbearably slow for a while.

The funny thing is that it only started recently. I’ve been working on that project for a while without problems. I have tried disabling plugins, but that didn’t help. The only two other major things that are different since then are that I’m running Mavericks, and that I have encrypted my hard drive. I’m thinking it might have something to do with the latter?

0 Likes

#14

So i have been looking at what could be related to this issue. I have actually found a way of reproducing it. Basically the slow down occurs when my system is even slightly taxed. Like if i open chrome, outlook, and onenote. that seems to be enough to cause ST3 to render at like 3 frames per second. I also believe it has something to do with swapping memory to disk. Anytime my system is using over 6% disk ST3 just sucks. At least now i know that i can close a background process and make sublime be normal again… Also I am not like taxing my computer to get this to happen. i am using like 6-7% cpu 20-26% memory and 6-10% disk when st3 is crapping out. If i had to make a wild guess however ST3 now is reading from disk somewhere in the rendering loop which is tanking me but who knows. maybe this will give someone enough info to fix this problem.

0 Likes

#15

Im also having this same problem. The program runs very slow (especially typing…) scrolling isnt quite that bad but still very sluggish!

Mac OS X 10.9.2
2.66 Quad-Core Intel Xeon
8GB Ram

0 Likes

#16

I had this same problem, and I think I have identified the source, at least for my setup. I am using Sublime Text 3 build 3059 portable 64-bit on Windows 8. I didn’t have any problems until recently. Before I figured out what it was, I also tried turning off ST3 indexing, my anti-virus (avast), and Windows Defender, none of which fixed the problem.

Turns out, the problem was editing the text file in Boxcryptor (https://www.boxcryptor.com/) was a problem, probably because of the file locking. When I use ST3 with an unencrypted file outside of Boxcryptor, it works just fine. I’m using Boxcryptor with Dropbox, so I tried it with an unencrypted file inside of a syncing Dropbox folder, which also worked fine without any slowness.

Sadly, it looks like I can’t edit files easily, so I am working with a local clone on my desktop, which I sync with the Boxcryptor directory. I don’t know if there is any luck with other cloud encryption services, but I don’t have time to try them out now. Hopefully, this helps out others who have a similar workflow.

0 Likes

#17

Same issue, I upgraded to build 3065 and ever since typing lags tremendously - text queues up and is dumped all at once, and scrolling is choppy.

I removed all of my packages just in case there was some sort of conflict but no dice, still lags.

I <3 sublime and have for years now, but I’m going to have to switch to another editor until this is resolved…

Specs
Mac OS X 10.9.2
2.3 GHz Intel i7
16GB Ram

0 Likes

#18

Wow this is an old post. I was like why is my name on the front page? lol. anyway… Here are all the things that I found that could cause this back in the day.

  1. Indexing going crazy on some systems. Solved by disabling file indexing in ST settings.
  2. File locking issues. I think this was solved by jon but it was caused by other applications locking the files sublime was controlling in it’s projects. Only solutions I know about involved finding and stopping the locking.
  3. Firewall/malware protection. This was a problem for most people and was solved by allowing ST through all there firewalls and auto scans. This is probably best scene by disabling firewalls entirely and seeing if your ST is fixed.
  4. 3D/GPU bottlenecking. So back when I was having a problem there was a bug in the stereoscopic support and ST. The best solution I found was to disable 3D stereoscopic support for my monitor through the windows settings. I use windows so it was really easy but it completely solved my problem. The windows setting was for my monitor and was called “3D Stereoscopic Support” and I just disabled it cause I don’t use that at all.
  5. the last thing was about GPUs and mac computers. I didn’t research it but it had something to do with high DPI/aspect ratio monitors. I know there is a gpu setting in ST settings for it tho. You might look at that.
0 Likes

#19

So many potential solutions! I had such high hopes!

  1. Disabled this in my user settings, restarted SB3 and no dice.
  2. I found no locked files
  3. I disabled my firewall, no dice.
  4. It doesn’t seem as tho Mac has settings for 3d Stereoscopics
  5. I set gpu_window_buffer to false, again no dice.

I guess I’ll try a clean removal and, if I still lack dice, reinstall ST2 …

0 Likes

#20

Crap, I was really enjoying coming back to Sublime when started to have this issue again, which was also the reason I moved away before.
Guess i’ll need to consider other options.

0 Likes