02/29/2008, 10:55am, EST
Friday, February 29th
Apple hiding Safari code from developers
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.
Filed under: troubleshooting, software, developer, Apple
Other story tags: Safari, Firefox, code
,
, 12
,
,
,
,
,

subscribe to comments
for this article
Everything is documented in the code (and yes, it's there in the comments, apparently - according to the slashdot thread on this subject).
In fact, the "hidden code" affecting screen redrawing IS NOT EVEN USED BY SAFARI - IT's TURNED OFF! (It's a hack that's only there to ensure that THIRD-PARTY APPS don't break.)
This story is complete rubbish - in fact, it indicates the OPPOSITE of what the title implies:
"Apple using private WebKit code to fix broken third-party apps"
The final line: "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" is the kicker. Seth's look at the WebKit builds is in no way linked to the story about stubbed placeholder code, and to suggest a link is rather disingenuous.