Apple hiding Safari code from developers
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.










News?
02/29, 11:02am reply
As far as I can tell, the proof of this is "I can't see any other reason, so this must be it!" That's hardly solid.
njfuzzy
Fresh-Faced Recruit
Joined: Apr 2001
Now if only...
02/29, 11:20am reply
...Apple would use their secret weapon code to improve Java performance, we'd be set!
godrifle
Fresh-Faced Recruit
Joined: Jan 2006
Read before you Report
02/29, 11:24am reply
Perhaps the writer of this post should have read the entire thread before posting to have more of a balanced, less sensational post. David Hyatt (who I believe is heading up development of WebKit/Safari and might now a thing or two about the APIs) Posted what seems to be the official response to this discovery. He points out that there were publicly documented and more importantly, supported methods of achieving the same result discovered by Vladimir, and that the WebKit team is able to implement these APIs as a form of development to bug hunt and ensure that the API's are matured and therefore not a moving target for developers, before they are published.
Seedublyew
Fresh-Faced Recruit
Joined: Feb 2008
Not "Hiding" Not "Secret"
02/29, 11:32am reply
There is nothing "hidden" or "secret" in an OPEN-SOURCE LIBRARY!
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"
analogika
Posting Junkie
Joined: Feb 2005
Wow
02/29, 11:40am reply
MacNN, this is plainly bad reporting. The issue has been discussed and closed, but you fail to mention David Hyatt's response.
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.
mudmonkey
Forum Regular
Joined: Jan 2000
tabloid reporting
02/29, 12:02pm reply
This issue was already resolved long before MacNN decided to druge it up and use the story for shock value (ad revenue $$). MacNN's reporting is getting worse and worse, to the point that I'm about ready to find my news elsewhere.
petsounds
Fresh-Faced Recruit
Joined: Apr 2007
STOP THIS BS
02/29, 12:28pm reply
Seriously, stop propagating BS. Take the time to understand wtf you're talking about before posting an article so you don't perpetuate what is clearly BS. If you don't understand the technical details of what's going on, find someone who does. Lacking all that, at least take the time to fully read the article, comments and responses. Had you read TFA and the responses on /. or the original post, you would have found a response from the Webkit developers which pretty clearly debunks the poster's whining. If you can't comprehend what the Webkit dev is saying, then please refrain from posting the article because (sorry) you ain't qualified to have an opinion or pass the info on, since you're just going to s**** things up.
dogzilla
Mac Enthusiast
Joined: Sep 1999
IdiotNN
02/29, 12:31pm reply
Maybe if they had mentioned that the lead developer of Safari replied to Vladimir and explained, in detail, what is going on, then, maybe, this would count as news.
ZinkDifferent
Fresh-Faced Recruit
Joined: Jan 2005
also...
02/29, 02:32pm reply
... it must be nice for webkit authors to have firefox authors publicly worry about the competition.
adrian_milliner
Fresh-Faced Recruit
Joined: Jun 2005
my 2 cents
02/29, 03:30pm reply
David Hyatt has it explained, and in my opinion as a professional developer and code-quality reviewer is this: the drawing code in computational intensive app should account for the fact that FPS is capped, either by technical constraints or by human eye perception. I hope the next composition engine for FireFox 3 (which will be implemented in next beta, according to Vlad) will hold to this standard, and will effectively use time to next frame instead of just stalling critical computation.
ViktorCode
Fresh-Faced Recruit
Joined: Jan 2006