Sublime Forum

Sublime lags

#1

I’m having real trouble with Sublime lagging all of a sudden. I do have a lot of files in my project, but no more than I had last week when everything worked fine. If I open a clean Sublime, it doesn’t seem to lag as much, but within my project I can’t even type. I’ve disabled all the plug-ins I had added with no change. I’m on an Ubuntu machine with build 3126. I tried uninstalling ST3 and reinstalling, and installing ST2. No change. The rest of my computer works fine. Any ideas?

0 Likes

#2

Providing more info will help people help you. Here are some ideas of info that may be helpful:

  1. Operating system
  2. If you’ve reverted to a freshly installed state
  3. An example file you are seeing lag on
  4. A description of what exactly is lagging (scrolling, typing, caret animation, etc)
  5. If your OS is showing heavy CPU usage by Sublime Text
  6. If you’ve tried the latest dev build
1 Like

#3

I too have noticed a sudden spike in lag when saving. I disabled every single package, restarted, and the lag was the same. No matter what file, Sublime Text becomes unresponsive for 1-2 seconds. This just started.

0 Likes

#4

This sounds unrelated to the issues presented by @thumbtackthief.

Could you open a new topic and provide some of the details I asked for above?

0 Likes

#5

-I’m on Ubuntu 16.04.3.
-I’ve uninstalled and reinstalled ST3 and also tried ST2; same problem.
-All files experience the problem, including a blank file not in a project.
-Everything lags; typing, search, Ctrl-T file search, among others.
-OS is not showing heavy CPU usage (as far as I can tell–not my forte, but System Monitor has it at zero when idle, rising to 4-5% when I type something).
-I’m using Build 3126

0 Likes

#6

Did you reverted to a fresh install? Usually you do not need to uninstall Sublime Text, only revert it to
a fresh install: https://www.sublimetext.com/docs/3/revert.html

I also had lag issues, but it was due a third part package which was causing heavy ram usage. You can see the details on: Core$1846 add_regions causes Sublime Text to hang for ever after eating 1.81GB of RAM

0 Likes

#7

Yes, I’ve also tried reverting to a fresh install following those steps. No help. :frowning:

0 Likes

#8

Anyone have any ideas? I’m getting desperate.

0 Likes

#9

I would try the dev build 3142. Also, if you have an Nvidia driver, try a different driver. If you currently use the Nvidia blob, try the open source driver. If you use the open source driver, try the official blob.

0 Likes

#10

I’m not a registered user at the time… was going to become one but not if it’s not working

0 Likes

#11

Did you try the driver thing? If build 3126 was working fine and isn’t working now, that indicates something in your environment changed. I don’t know if it is the contents of your code/project that could be causing it, or if something about your machine is causing it, but build 3126 is still the same as it was back in September 2016. There were some improvements in the current dev cycle that addressed some laginess when there is CPU contention. There were a bunch of bug fixes and other improvements, but the only way to be sure would be for you to test.

What you’ll most likely have to do is wait for 3.0 to come out and see if things are improved.

0 Likes

#12

Definitely not the project, as I have the issue even in a solitary empty file. Trying to figure out the driver now.

0 Likes

#13

None of this is my forte, but from what I’ve gathered it does not seem as though I have an Nvidia driver in use

0 Likes

#14

I have your setup.with Intel HD (integrated) graphics, and Sublime Text works fine for me.
Just my two cents.

0 Likes

#15

Does this percentage have anything to do with it? It slowly rises to 100%; I’ve never seen it before.

0 Likes

#16

It should help with lagging, if it is using 100% of your CPU on Sublime Text build 3126. On build 3142 the lagging due this should be fixed in any case.

That is the indexing state of the files on your project. It is used to do really fast searches and allow you to use the go to symbols features of Sublime Text. The indexing should happen only a few times as when you install new packages, creates a new project or add several new files to your project.

You can disable the indexing if you go in your Sublime Text settings. Also note some bad package can trigger the indexing every time, so you should take care of which packages you install on your Sublime Text.

0 Likes

#17

That is the indexer running on your code base. It will scan your project once and then save the results, even if you restart Sublime Text. It looks for function and class definitions and powers the Goto Definition functionality (keyboard shortcut and hover popup) and the Goto Symbol in Project quick panel.

If you click on the percentage you can see what the indexer is doing. The only way the indexer should cause lag is if you:

  • Have only a single-core machine; OR
  • Have index_workers setting set equal to or greater than the number of cores in your machine - this can result in one core serving both the UI process and an indexer. As of build 3126, the value 0 will select 1 indexer for 1 or 2 core machine, 2 indexers for a 4 core machine and n-1 indexers for machine with more than 4 cores.

As @addons_zz mentioned, build 3142 significantly improved responsiveness when there is heavy CPU usage on your machine.

One thing of note: you said there wasn’t high CPU usage on your machine, but if an indexer is running you should see at least one core running full speed.

0 Likes

#18

I can’t install 3142 until I register, which I’m happy to do… after I get it working again. I realize there’s a chicken and egg problem there but…

0 Likes