Sublime Forum

Typing very slow/delayed even on small files

#5

List your installed plugins. More than likely one is executing on every selection or modification and bogging things down. Not all plugins play nice. I am on Mac with no issues.

0 Likes

#6

Do you have an open project with a lot of folders inside AND the SublimeCodeIntel plugin installed? If yes, that can be the problem.

CodeIntel will try to give you intellisense every time you hit a key, and if your project is big that can be an issue. I somehow reduced the problem setting the delay after which the plugin is activated. Just put this on your user file settings:

{
	...,
	"sublimelinter_delay": 500
}

Hope this helps

0 Likes

#7

Appreciate the input, I tried making that settings change but it didn’t help. Also, I confirmed that I don’t have any project folders open, but am just creating a blank text document and still saw the issue.

HOWEVER, I just found a very interesting data point. If I resize my sublime text window to something really small like 300px x 400px, typing is crazy fast with no delay. If I then adjust the height from 400px to 500px, I notice a very slight but manageable delay if I type really really fast. If I boost the window height to 600px, now the delay is starting to get to the point where I occasionally notice it at normal typing speed. This curve continues, the point where if I make it full screen 1440x900, the slowness is as I describe in my original post.

Just for fun I kicked my native display all the way down to 800x600, however typing was still delayed even at that low resolution settings.

Really seems like the slowness corresponds to the size of the window/how many pixels sublime text is drawing on these green.

0 Likes

#8

I can replicate this when running a 27" external monitor from my macbook pro (13" late-2009) and making the sublime window very large.

0 Likes

#9

Has this been verified with no plugins? Until, this can be verified, I am sure this won’t get much attention. It has to be proven to sublime itself and not a plugin.

0 Likes

#10

Forgive my ignorance, how do I disable all plug-ins? I’m just running a stock install and haven’t installed any plugins myself, but I’m assuming some come pre-installed may be auto-enabled? If so, how do I disable them? I’ll keep poking around and see if I can figure it out, but I looked through all the File Setting/Global Settings text files, and didn’t see anything about plugins or them being enabled.

0 Likes

#11

Ahh… more than likely if you don’t know if you have plugins, you probably don’t have plugins. I am not using a huge screen, so maybe there is some issue.

0 Likes

#12

Here’s a little video I made to demonstrate the behavior. I really hammered on the keys so you can hear when the physical act of typing stops. This is on a my Macbook Air, but to show it in the ‘worst case scenario’ I’m outputting it my Apple Cinema Display 24".

http://vimeo.com/31667360)

0 Likes

#13

Here’s a video which attempts to demonstrate the issue on my setup: dl.dropbox.com/u/16332218/IMG_2319.MOV

Even during keyboard navigation operations, when running fullscreen this latency makes sublime pretty hard to productively use. I feel the need to stop typing every so often to let the editor catch up, else I’m my brain gets into a conflicted state.

No plugins enabled.

0 Likes

#14

Wooho, good news! I updated to 10.7.2, and this problem has gone away. Even at full screen on a 24" display, typing is extremely fast and responsive. So looks like this was a Lion bug, not Sublime Text

Peppy, what version of Lion are you running? Can you try updating?

0 Likes

#15

Unfortunately I’m already on 10.7.2. Comparing to other text editors (TextMate, TextEdit and XCode) at the same window dimensions, sublime definitely does fall behind in terms of performance. For me it would seem to be capping at a CPU bottleneck, with sublime completely saturating one CPU (and windowserver sitting at 30% usage on the other).

0 Likes

#16

I had the same problem with my new iMac (Mac OS Lion), whereas at the office, I didn’t encounter the problem, with OS X Lion too.

I disabled the “minimap” and the problem was solved !

Hope this will help you !
Nicolas

0 Likes

#17

I found the same thing to be true on my brand new macbook pro. I believe the poster was onto something in terms of it being screen resolution. The new macbook pros have retina display, i.e. 4x normal screen res. I have the latest OS. Sublime Text 2 has always been super snappy for me but on this new computer, the typing lags behind.

0 Likes

#18

I can confirm this problem exists on the new “retina” Macbook Pros on latest version of Lion. When using full screen mode on the highest resolution, the editor is unusable it is so laggy. I have to keep mine sized to taking up maybe only about 40% of the screen to make it usable and even then I can sense a slight lag as I type. Any ideas? No plug-ins installed.

0 Likes

#19

I just got a MacBook Pro Retina and can confirm the lag on a fresh install of Sublime Text 2 on Lion 10.7.4 with no other applications running. I am running at the resolution that “looks like 1920x1200” or 1920x1200 (HDPI). The larger the editor window the longer the lag. The issue of lagging affects Chocolat even more, but doesn’t affect full screen CodeMirror in Chrome Canary at all. Chrome Canary in general seems to be unaffected by the lag. I have yet to try IntelliJ with retina support but will try it soon. Hacker Typer in Chrome Canary has a little bit of lag but less than Sublime Text 2.

Update:
Just tried CollabEdit and Google Docs with large windows and full screen. No lag. Sublime Text 2 in full screen is unbearably slow. IntelliJ is still downloading.

Update 2:
Experimenting with different resolutions using SwitchResX. There is no lag at 1680x1050, although at that resolution I don’t personally have a reason to own a retina MacBook (I could buy a normal MacBook Pro at that resolution). There is lag at 1680x1050 (HDPI). If the editor is large enough there is some lag at 2880x1800.

Update 3:
At 1920x1200 (HDPI) there is no lag in IntelliJ using the retina hack.

0 Likes

#20

I’m having the same problem on my Retina MBP.

On Lion I was able to get rendering up to 60 FPS by opening “Quartz Debug” and disabling Quartz Extreme. Also the GPU has to be in integrated mode for the performance to be good. You can force this with gfxCardStatus.

Obviously disabling Quartz Extreme makes other applications very slow (such as Google Chrome). Also on Mountain Lion I’m not able to replicate the good performance with this trick.

This leads me to believe that Sublime does something that interferes with hardware acceleration. I have never done any GUI programming on OSX so I can only guess, but I imagine any software rendering could cause this by requiring copying back and forth between graphics and normal memory (which could be faster on the integrated GPU that shares memory with the CPU).

0 Likes

#21

Quite related: "goto anything" performance on retina panels

0 Likes

#22

Same problem, 2560x1600 display running Mountain Lion. Sublime text is pretty much unusable if I make the window as large as I can. If I halve the window, it’s perfectly fast. This happens regardless of how much text is rendering, and having plugins or not makes no real difference to the speed. Really frustrating as everything else I use have no lag problems at all, is there any chance this will be fixed?

0 Likes

#23

Hi,

I am new to this forum but thought I would put my five cents worth in regarding this problem. I echo the same issues just about everyone else in the thread has, when using the window at just over half of the screen (vertically) on a 24" monitor at a resolution of 1920 x 1080 the typing becomes extremely laggy, ianfitz video he posted demonstrates the exact issue I am having, I tried to take a look at what peppy posted but the dropbox link doesn’t seem to be functioning anymore. Like others have also said in the thread when using “fullscreen mode” typing just becomes unbearable.

I am using the latest version of Sublime Text 2 on Mountain Lion (10.8, Mac Pro) with all software up to date. I have installed some packages within ST2 but from what people have reported this problem is evident in clean installs as well so I really don’t see the point in removing what I have. I am a very big fan of ST2, I have found it to be an excellent editor after trying multiple others I wouldn’t change. I do hope something in the form of a patch can be released to resolve this issue or some feedback on how to fix it because it is really annoying not being able to split screen my development.

I will be keeping a close eye on this thread to see how it goes, thanks for your time.

Giganic.

0 Likes

#24

The latest nightly build (2218) made a huge difference for me, now it’s perfectly acceptable on 2560x1600 mac pro with 8800 GT for me.

0 Likes