updated 10:55 am EST, Fri February 29, 2008
Apple hides Safari code
A Firefox developer who goes by the name Vladimir said on his blog that Mac OS X could potentially have code that enhance Safari's performance. In his blog, Vladimir says that while collecting feedback from Mac beta testers for Firefox 3, several have indicated that the new iteration seems to be anywhere from 50- to 500-percent slower than v2.x. After some troubleshooting, Vladimir reveals that the screen drawing synchronicity engine causes the issue.
Called "coalesced updates", the Mac OS uses this to synchronize all screen drawing done at the OS level. Vladimir notes that an Apple tech document reveals a way to exclude an application from the update cycle, which in turn enhances the performance of the application.
When he went to inspect WebKit – the developer version of Safari – he noticed that it was able to draw much quicker than Firefox, going beyond 60 frames per second, over double that of the coalesced screen drawing. WebKit, however, did not feature the exemption code. This means that there is an unknown factor which links Safari to be very close with the Mac OS, and that Apple wants to keep this information hidden.
Vladimir says that WebKit is now host to "over 100 'OS-secrets-only-WebKit-Knows' in the library". Despite these claims, Vladimir says that he does not insinuate that Apple is trying to be malicious in any way
"To be clear, I do not think that Apple is in any way trying to purposely "cripple" non-Apple software," says Vladimir. "I also do not think that undocumented APIs give Safari any kind of "significant performance advantage" (as Firefox 3 should show!). However, as I said, the undocumented functionality could be useful for Firefox and other apps to implement things in an simpler (and potentially more efficient) manner. I don't think this is malicious, it's just an unfortunate cutting of corners that is way too easy for a company that's not fully open to do."
Earlier this month, Computerworld's Seth Weintraub noted that Safari was due for a large speed boost, based on his experiences with the current build of WebKit.