Sublime Forum

Typing very slow/delayed even on small files

#1

Wondering if anyone else has seen this. Iā€™m seeing typing be very slow, even on very small (10 lines) files. I type about 90wpm, probably faster in smaller bursts. I can be typing, and ā€œget aheadā€ of the letters being shown on the screen. Love Sublime Text, but this behavior is really a deal breaker.

I tried the latest official release as well as the latest dev release. Saw a thread saying the Cobalt theme was the culprit, but Iā€™m not using that Theme. Tried many different themes but all have this issue. I also tried completely deleting my Library folder for Sublime Text 2.

Iā€™m running OSX Lion on a Macbook Air Core 1.8GHz Core i7ā€¦wondering if this is a Lion issue.

0 Likes

Repeated key presses ignored on OSX
Slow Key Repeat
#2

Mac Pro + Lion + Latest Sublime Dev : No Problem at all.

Maybe this is a Macbook Air Problem? - Or a problem with another installed software which runs in the background. Did you have a look at used CPU and Ram usage? - Maybe thats the culprit.

0 Likes

#3

CPU Usage < 5%, 1.3GB free memory :frowning:

Iā€™m also wondering if this is Macbook Air thing. Maybe something with OpenGL and the graphics card on the Air? Itā€™s an Intel HD Graphics 3000 apparently.

FWIW, typing in other apps is fine, including in iTerm which Iā€™m guessing might use a similar rendering method as Sublime.

0 Likes

#4

Still happening on build 2138, anyone else?

0 Likes

#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