Home Download Buy Blog Forum Support

"goto anything" performance on retina panels

"goto anything" performance on retina panels

Postby peppy on Sat Jun 30, 2012 4:58 pm

I have previously complained about the performance of goto anything during typing a filename, but it actually seems worse with the new retina 15". The performance is bad even when not previewing a new file, which makes me think the only logical answer is that sublime is rendering off-screen text for items in that list. The hardware in this thing struggles to render text as it is (sublime scrolls worse than on my 2009 13" macbook pro), so would potentially cause the huge impact I'm seeing.

When typing a filename which matches quite a few results, and keeping that file at the top of the list (by continuing to type the filename) I get an update every 0.5s or so. I can make a video if necessary.
peppy
 
Posts: 52
Joined: Thu Aug 04, 2011 4:52 pm
Location: perth, australia

Re: "goto anything" performance on retina panels

Postby Bramjetten on Mon Jul 02, 2012 6:16 pm

I can confirm this. Performance on my retina MBP is subpar.
Bramjetten
 
Posts: 5
Joined: Mon Jul 02, 2012 6:14 pm

Re: "goto anything" performance on retina panels

Postby peppy on Tue Jul 03, 2012 7:59 am

Okay, after making a video to show this happening, I did find that removing my installed plugins/packages made it a hell of a lot faster, though there is still some latency (which is probably just the document preview rendering — would still love a toggle for that). I will include the video as the text rendering/scroll speed is no different with or without plugins: http://youtu.be/QRa7v1R7khk?hd=1. I've done a short write-up on what I have noticed so far OS-wide if anyone is interested: http://whrl.pl/RdeQvl
peppy
 
Posts: 52
Joined: Thu Aug 04, 2011 4:52 pm
Location: perth, australia

Re: "goto anything" performance on retina panels

Postby jps on Tue Jul 03, 2012 8:37 am

I'll take a look at this towards the end of the month, which is when Apple tells me my retina macbook will be arriving.

Assuming the bottleneck is purely fill rate, then there are a few options available for optimising this.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: "goto anything" performance on retina panels

Postby peppy on Tue Jul 03, 2012 9:51 am

It's definitely not fill rate, but more to do with the rendering of text. So any kind of caching of text will help. I'm guessing Apple will release some kind of documentation regarding this at some point, considering how well they optimised Safari 6.
peppy
 
Posts: 52
Joined: Thu Aug 04, 2011 4:52 pm
Location: perth, australia

Re: "goto anything" performance on retina panels

Postby jps on Tue Jul 03, 2012 10:29 am

Unless there's something fundamentally wrong in the OS X graphics pipeline, it's almost certainly CPU fill rate. With 4 times as many pixels as most applications are tested with, that's going to be the component that gets stressed. The GPU will have no issues moving that many pixels, but it doesn't help applications that rely on the CPU for rendering, which is most of them, including Sublime Text.

With regards to text rendering, Sublime Text already does glyph caching, Core Text isn't in the critical path.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: "goto anything" performance on retina panels

Postby quarnster on Tue Jul 03, 2012 11:18 am

There are 4 cpu cores with 2 hyper threads each though and blitting graphics is a ridiculously parallelizable task. So if you "own" those routines rather than relying on a library there's much that can be done.

As for using the gpu instead, not knowing any details of how text rendering is implemented in ST2 couldn't you just cache the glyphs to 1 or more altas textures and blit using gl?
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: "goto anything" performance on retina panels

Postby jps on Tue Jul 03, 2012 11:51 am

quarnster wrote:As for using the gpu instead, not knowing any details of how text rendering is implemented in ST2 couldn't you just cache the glyphs to 1 or more altas textures and blit using gl?

That's essentially how S1 works, although there's a bit more to it to handle sub-pixel anti-aliasing.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: "goto anything" performance on retina panels

Postby quarnster on Tue Jul 03, 2012 1:31 pm

You could also draw the curves with triangles using special texture coordinates and shaders as described in GPU Gems 3 which is quite clever IMO. I stumbled upon a piece of code converting ttf-fonts to a format suitable to be rendered that way that looks interesting for my own projects. It's in a need for some cleanup before it's usable to me though. I'll post a github link once I've cleaned it up enough to compile and I have a small test working.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: "goto anything" performance on retina panels

Postby quarnster on Tue Jul 03, 2012 6:42 pm

For anyone interested: https://github.com/quarnster/TTF. I havent figured out yet how to properly render triangles marked as tpos.z==+1.0 though.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Next

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], waffl and 31 guests