Sublime Forum

Sublime lag on Linux

#1

Hi All,
A lot of people seem to have different kinds lag problems but I have not seen a resolution to the general typing lag.
Any tricks that resolve this will be hugely appreciated because I really like the look and feel of Sublime.
: )

Here are my observations:
Lag seems proportional to the window size. It is not proportional to file size. Huge files in a small window are no problem.
Alas, I love to work in full-screen. approx 1400x800 but I have friends who run Sublime with no problems with +2k-res.
Worst case: Lag is perhaps one second per keystroke, just for moving the cursor.

ST3 Build 3059 32 as well as 64-bit builds. Same thing in some ST build
Plugins? Nope. Even killed plugin_host, no differance.
Temp files? Nope fresh install.
Linux SUSE 11

The thing is that this is a remote machine and I use NX-pro to connect to it. You may think this is the root of the problem.** But eclipse, vim and whatnot run perfectly.
**
I tried strace and saw that just moving the cursor a few times triggers several calls to select() read() writev()
(Dunno if it is relevant but: This does not happen in eclipse)
select() is called all the time even without doing anything but then the call times are on the 20 microsecond magnitude. And when pressing a key there are maybe 10-20 calls to select() that have call times around 10-30 milisconds.

0 Likes

Slow Key Repeat
#2

it’s working fine for me. do you see a lot of cpu usage during lag period? do you also see lag when scrolling screen or clicking mouse?

0 Likes

#3
  • There is the same lag when I click the screen.
  • I see a clear increase in CPU usage when scrolling.
  • There also a great lag when just pressing an arrow key but I cannot fore sure see a great CPU-usage change, but it is a bit difficult to tell on a 16-core machine.

My gut feeling tells me that Sublime is redrawing the whole screen even for cursor moves. I base this on the fact that lag seems proportional to window size.
Is it possible that Sublime internally relies on some library calls that (incorrectly) trigger a full-window redraw?
Even if that is the case, and without any graphics acceleration, more than 1 second to move the cursor seems unreasonable.

I will also takwe a look in my NX-client and see if there is anything suspicous there, but I doubt it as other editors are OK.

0 Likes

#4

I could be completely wrong, but I have a feeling it has something to do with graphics (driver, etc). It sounds like you have a remote X session? My guess is that is the issue. It probably has something to do with how Jon implemented the UI layer in Sublime. Try it on a local machine and see if you get the same issue.

I would not be surprised if other editors do not have the issue - Vim uses textual output and Eclipse uses GTK. Sublime, I believe uses GTK for menus, window border, etc, but the editor panel and sidebar are all custom. That is how users can create their own themes.

0 Likes

#5

I think you could be totally right!
It would be ab fab if someone could bring my observations to Jon’s attention. I bet he could answer in a blink. : )
As I said my Linux machine is far away from where I sit and I have nere seen it. I use NX pro on Win7 to access it.
It has no graphics cards as far as I can tell.
It has no sound. (I saw a thread about Sublimes sounds, perhaps this is something. Probably not though, considering my window size observations.)

Thanks for the helpful attitude : )
Adam

0 Likes

#6

Also if you have a monitor with built in 3D stereoscopic support disable it. I had that exact problem and solved it by disabling stereoscopic support. I have a windows machine so that was rather trivial but i suspect it would be for your machine as well.

0 Likes

#7

Thanks but: I cannot completly disable 3D. When I access the monitor settings in Windows, the regular settings dialogue gets intercepted by “Intel Graphics yada yada settings”. There I have:
“3D -> 3D preference -> Speed/Quality” and unfortunately I see no difference [in Sublime performance] when I select one or the other. I do have an extended desktop but I fail to grok how that would impact things.

0 Likes

#8

That is the wrong setting i think. 3D stereoscopic support is kind of rare where 3D is a graphics card thing. 3D stereoscopic is not something you are using unless you know what it is so I would recommend looking into if you actually have it turned on, which it sounds like you do. But 3D settings for high/low are graphics quality which wont change anything. I cant really help you much more with out knowing more but google how to enable 3D stereoscopic for you system you will find it sooner or later. then just disable it instead. just keep in mind your rig might not support it which is fine, it just means that is not your problem.

0 Likes

#9

This is a new work comp and I am pretty sure have not accidentally turned any such thing on.
What makes think I have? THX

0 Likes

#10

I had this problem and i solved it by turning off 3d stereoscopic support.

0 Likes