Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm quite amazed that Safari is the only browser in OS X that manages to get (nearly) perfect inertial scrolling.

  • Even with lots of flash content on a website, Safari's scrolling is smooth.
  • There are websites with lots of content to load and Safari will continue to scroll smoothly while the content is being loaded and rendered.
  • Installing several extensions does not have an effect on the scrolling performance.

The major competitors to the Safari browser on OS X are Chrome and Firefox. Both don't manage to deliver the same smooth scrolling like one is used to in Safari:

  • Enabling flags like GPU compositing on all pages in Google Chrome (chrome://flags) or ...
  • smooth scrolling in Firefox (Options > Advanced) don't deliver the scrolling performance that Safari delivers per default.

Question

Is Safari using private API to deliver smooth scrolling that the Chrome/Firefox developers's can't access? How come Safari's scrolling is so much better and competitors don't manage to deliver non-broken scrolling.

I'm wondering especially about Chrome because it usually adapts to new OS X features really fast.

share|improve this question
    
I disagree. Firefox's scrolling is far superior to Safari's (I am on 10.7.4 on a mid-2011 Macbook Air): It is almost always smooth 60Hz while Safari always "snags" a little bit. I tend to still use Safari though because of the nice zooming and "cover" effect when two-finger-swiping sideways to go back or forward. –  Steven Lu Jul 1 '12 at 23:06
2  
Dammit. Ever since you pointed it out I'm noticing Firefox tearing a lot more now. It does it all over the place. Text (like on this site) flicker and shudder as they move inconsistently across consecutive frames. –  Steven Lu Jul 2 '12 at 6:18
1  
At any rate, Safari on Lion, combined with Apple's touch input devices (touchpad/magic mouse) probably the most user friendly and nicest rendering web experience available anywhere. It correctly applies vsync and so no animations tear, and I can't get enough of the tight pinch-zoom and scroll-left-to-go-back features. Sometimes scrolling hiccups slightly, but I think we would need access to internal tools to be able to profile what is causing those issues. If I ever get a job at Apple I'd want to work on this. –  Steven Lu Jul 2 '12 at 6:44
1  
Wow, loads of comments. I'm adding another, as it's speculation, not an answer... Ignoring the fact that Safari is available on Windows (Why not, everyone else does..), I think it's a simple matter of Safari being written for the Mac, and the rest of the browsers necessarily sharing, to some extent, codebase with multiple platforms, making it hard to get it perfect on each one. –  stuffe Jul 10 '12 at 17:37
1  
It's hard to imagine that Safari would not use private APIs: such APIs exist for no other reason than to provide features to Apple's software. But that's just conjecture, and I don't see any other way to actually answer this question... –  Dan J Jul 15 '12 at 3:13
show 10 more comments

2 Answers 2

The difference is likely to do with the architecture and interprocess communication choices of each browser.

Modern web browsers render pages in separate processes. Apple has a framework called IOSurface that provides a streamlined way for one process to pass an image to another process. This framework was introduced in Mac OS X 10.6, aka Snow Leopard, for the latest iteration of QuickTime.

QuickTime uses IOSurface to offload movie decoding to separate processes. With no decoding to do, the QuickTime Player application is left dealing solely with the user interface and showing images provided by the decoding processes.

I suspect Safari has learned from QuickTime and is using the same techniques. Web pages are offloaded to other processes, rendered, and passed back.

Could Chrome and Firefox do the same thing, absolutely. The challenge is ensuring the thread dealing with the user responds quickly and is not delayed waiting for the rendering to update.

Chrome does use separate processes and appears to use IOSurface on the Mac; this bug talks about improving Chrome's use of IOSurface.

IOSurface is a public framework available to any Mac OS X 10.6+ application. However there is little documentation and it is Mac specific.

This is all conjecture.

share|improve this answer
    
Chrome does use separate processes to render content, fwiw. –  Nathan Greenstein Jul 19 '12 at 14:57
1  
Thank you for your answer! It's sad that there's so little resonance to this question so far. But I can understand this if one cannot refer to primary sources. –  gentmatt Jul 24 '12 at 13:15
    
@gentmatt how do you find the scrolling experience on browsers that use WebKit? This may help separate out impact of the browser's rendering engine from the surrounding browser interface implementation. I believe OmniWeb uses WebKit. –  Graham Miln Jul 24 '12 at 15:36
    
@GrahamMiln Chrome uses Webkit as well. But Chrome's scrolling is quite far from perfect, IMO. It really depends on the content of the website. Generally, the performance is not so well. –  gentmatt Jul 24 '12 at 15:42
add comment

The simple answer is the developers just don't care.

Non-Apple and non-Microsoft system software is substandard, plain and simple. They're unoptimised with zero concern for smoothness or user experience. Safari is smooth on OS X and IE is butter smooth on Windows. Compared to them, all other browsers are laggy. Chrome is the worst - It has a non-native UI and atrocious scroll lag, like all other Google software. It uses proprietary UI frameworks that are ugly and unresponsive compared to the platform's native UI. Even their other iOS apps are non-native have unresponsive back and menu buttons comared to the native iOS controls.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.