Mac OS X Secretly Cripples Non-Apple Software
spikedLemur writes "Vladimir Vukicevic of the Firefox team stumbled upon some questionable practices from Apple while trying to improve the performance of Firefox. Apparently, Apple is using some undocumented APIs that give Safari a significant performance advantage over other browsers. Of course, "undocumented" means that non-Apple developers have to try and reverse-engineer these interfaces to get the same level of performance. You really have to wonder what Apple is thinking, considering the kind of retaliation Microsoft has gotten for similar practices.
first post!
i cheated though, i'm using safari.
Oh give me a break, if you use an undocumented API for something that does not mean you "cripple" other pieces of software. It's not like OS-X says "oooo Firefox, quick make it run twice as slow". Grow up.
"Live as if you'll die tomorrow." Ridiculous. You could die later today.
Ludwig Wittgenstein
... but I used a non-Apple browser.
<sigh>
They are thinking that they are developing a proprietary operating system and they can do WHATEVER THEY WANT. Do not complain about this. It is Apple's right to do this. That's what you get when you make a deal with the devil... Both Microsoft and Apple have the right to cripple other people's software or make their proprietary operating systems run in any way they choose. Just accept it. If you don't like it, I've heard a rumour that there are a few alternatives out there...
how the mozilla team is keeping up with speed in the nightlies w/o access to the hidden APIs?
From tfa: "The reason why Firefox 2 wasn't affected was that Fx2 was not a Cocoa app"
So writing this from a native perspective introduced new APIs found in tech notes you should have read in the first place before writing and running into performance issues?
David Hyatt
;)
Feb 28th, 2008 at 1:24 pm
The programmatic disabling of coalesced updates should not be public API. It's actually a very dangerous thing to do. We aren't really happy with that code in WebKit, but we had to do it to avoid performance regressions in apps that embedded WebKit. Technically it's wrong though, since we turn off the coalesced updates for any app that uses WebKit! This includes drawing they do that doesn't even use WebKit.
As for the window display throttling, that was a pref designed for Safari (that we don't even use any more). It's not private or magic. It's nothing more than a pref that we can examine from Safari-land, so linking to that is just silly.
Many of the private methods that WebKit uses are private for a reason. Either they expose internal structures that can't be depended on, or they are part of something inside a framework that may not be fully formed. WebKit subclasses several private NSView methods for example, and it cost us many many man hours to deal with the regressions caused by the internal changes that were made to NSViews in Leopard.
As you yourself blogged, there was a totally acceptable public way of doing what you needed to do.
For any private methods we use that we think should be public, we (the WebKit team) file bugs on the appropriate system components. Many of these methods have become public over time (CG stuff in Leopard for example). Be careful when you dig into WebKit code, since we may continue to use the WK method even though it's not public API just because we need to work on Tiger.
In Microsoft's case, the goal of keeping "secret" APIs was pretty clear: whoever controls the Windows browser market, controls the browser market, period.
I can just see Steve Jobs rubbing his hands and gloating to his minions..."Yes, and with Firefox handicapped, we will have five percent of the browser market all to ourselves! Ours...all ours! Muahahahaha!"
The US free market: two halves of a government-granted duopoly are free to set the market price.
Duhhhhh...
Mac OS X 10.4 introduces a new behavior of coalescing updates that enables Quartz to more efficiently update the frame buffer during each display refresh. In addition to increasing system efficiency, Coalescing updates improved visual consistency and eliminates "tearing" during scrolling and animation. To coalesce updates, the Quartz window server composites all window buffers into a single offscreen frame buffer before flushing it to the screen. When your application issues a command to flush, the system doesn't actually flush that content until the next available display refresh. This allows all updates for multiple applications to happen at the same time. Window server operations (window resize or move, for example) are handled in the same manner--coalesced into a system-wide screen update.
I would assume Apple would be thinking this makes a lot of fucking sense.
They give app writers a way to turn it off if need be. What the hell are we crying about again?
If you read the article...
You lost me there.
www.timcoleman.com is a total waste of your time. Never go there.
Awwwwww... our little system is all grown up now! Who's a good system? Who's a good system?
Give a man a fire and he'll be warm for a day. But light a man on fire and he'll be warm for the rest of his life.
The submission is an exaggeration, and this "secret API" nonsense is speculation on the part of the submitter. Firefox's performance has already been brought up to snuff.
"You don't need a weatherman to know which way the wind blows." - Bob Dylan
The Safari performance improvements are coming in Safari 3.1, not yet available to the public. To see them today, you have to be running current WebKit nightlies. The difference between the new WebKit builds and vanilla Safari 3.0.4 is pretty dramatic.
If you look at the article its just stating that the proprietary library has a lot of undocumented functions, and that one of these functions accomplishes a task in a manner that is contradictory to what the Apple docs say to do. The speed gained can be had by sticking a few lines in the .plist, safari happens to use an undocumented API for this, but the end result is the same. Nothing in the article says that the same results cannot be had by third party libs. The rest of the APIs may be useful, but there is nothing indicating that they do something that a third party app cannot do.
I can't speak to the rest, but you think it's "almost impossible ... to replace apple programs to default to other ones"? I just changed PDF's to open in Adobe Acrobat instead of Preview by going into Get Info and under "Open With" I selected "Change All". Are you calling this "almost impossible", or am I missing something?
The Slashdot summary is accusing Apple of reserving the tasty bits for safari, but the article shows that it's webkit not safari that knows the shorcuts. Anyone is free to use webkit. it's apples optimized interface for applications. If Firefox chooses not to use it well I can understand why but they need to accept that their interface may not be as optimized.
Indeed what apple is doing does not seem that out of whack. They have an interface that is optimized for stability not speed. That's the proper way to do it. and they figure out how one can tweak it for speed. Do you make that the defaults or do you put those in a container like webkit where one can manage the tradeoffs better? duh...
Some drink at the fountain of knowledge. Others just gargle.
Wrong. The config option was effectively set automatically because Firefox 2 is a Carbon app.
And Safari it's self doesnt use them, and the Firefox team has already made 3.1 much faster than Safari.
It was a non-story that has been picked up by slashdot days late.
"Slashdot, where telling the truth is overrated but lying is insightful."
Microsoft did NOT do "what any sane company would do"! Most sane companies do not deliberately engage in monopolist practices in order to cheat and delude their customers. Microsoft did. There is no argument about that... they have been CONVICTED many times now of doing just that, in both U.S. and European courts!
"Most sane companies" do not do that. MOST companies at least make some effort to engage in Good Business, which involves both parties walking away feeling they got a good deal. That is a far cry from Microsoft's practices, which have largely been "Great! They're in the store! Now, quick, lock the door behind them before they can get away!"
Those are two very, very different approaches. It gained Microsoft a lot of marketshare... at first. But as anybody can see today, those tactics do not keep customers. It pisses them off. And once they find a way out, they tend to stay out.
If instead of conspiracy theories you are interested in an answer from one of the co-creators of Firefox and who is currently working at Apple's WebKit team, here it is: http://blog.vlad1.com/2008/02/28/finding-the-os-x-turbo-button/#comment-573
ACRONYMS! THE GOGGLES, THEY DO NOTHING!
Seriously though, your post was really hard to read. When you referred to OS X as "X", I was thinking "X Windows". Please, for the sake of everyone here and Slashdot reputation, declining or not, refrain from using such atrocious techniques. Really, who uses "%" instead of typing "percentage"? It's not that hard.
Choosing an email application other than Mail
Open Mail (/Applications/Mail).
From the Mail menu, choose Preferences.
Click the General button.
Choose your desired default email application from the Default Email Reader pop-up menu.
Note: You may need to set up the email application with your email account information. This information is not automatically exported from Mail.
Choosing a default Web browser other than Safari
Open Safari (/Applications).
From the Safari menu, choose Preferences.
Click the General button.
Choose a different browser from the Default Web Browser pop-up menu.
(from http://docs.info.apple.com/article.html?artnum=25566, which is the very first link on Google when searching for Mac OSX default browser.)
* Sometimes it's only a one step process. Apple claims that if you want to change your default browser/email client again you have to still have a copy of Safari or Mail on your computer, but actually most browsers, such as Firefox, automatically let you know if they are not the default browser and give you the option of making them default, which is just a matter of clicking "Yes" at a prompt.
CATS/Diebold '08- All your vote are belong to us!
They do not have the right to cripple other software I put on *my* system. A class action suit would come quickly if this is what apple was doing.
However Apple is not crippling other non-apple software. Vlad clearly states that Apple is using undocumented functionality to programatically do something that FFx3 needs to set configuration files to do.... basically apple's contributions to webkit use "secret hidden" code which isn't intended for the uninitiated. Apple *may* have a good reason for this... a specific 'weird' state may need to be achieved to use these functions, or the planets might have to align correctly during compilation... we dont know cause its binary; however Apple isn't *crippling* anything... they just aren't fully documenting everything a programmer is able to do on the OS X platform.
The I was told that Apple was better than Microsoft, that they were on our side, that it is ok to use OSX, that Apple gives back to the community. Bullshit, Apple, just another greedy corporation.
Yes! There definitely needs to be a -5 learn to fucking type mod.
-- Terry
By this reasoning anyone who sells anything is a monopolist. I can't buy Starbucks coffee from Dunkin Donuts. That doesn't make Starbucks a monopoly.
"Edit: Slashdot seems to have picked up on this, and in typical style, has completely misunderstood the post. To be clear, I do not think that Apple is in any way trying to purposely "cripple" non-Apple software. 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."
Don't confuse terms. A monopoly occurs when a company or group uses their market position (rather than the product's merit) to cause people to buy their product. Technically, it is quite possible that a Free software vendor could be guilty of monopolistic behavior. Believing that all propriety software vendors are monopolists is a clear logical fallacy as I have demonstrated, so please stop spreading misinformation. The merits of Free software do not increase because you post an irrational rant against propriety software.
This author takes full ownership and responsibility for the unpopular opinions outlined above.
I must say, I've been using Mac OS X since 2002 and have been a part of various mac forums etc.
That is *the* first time I have seen anyone refer to OS X as 'X'.
Very confusing.
save the GNUs!
I don't think this is at all of a surprise. Apple is just as an awful of a company as Microsoft is; perhaps moreso, now that Microsoft may learn from their mistakes (ha!) and Apple is just beginning to make them. People view Apple as this holy grail of corporations and they are just not. They are notoriously proprietary; I don't see why Slashdot doesn't just despise them like they do Microsoft, given /.'s love of open-source. Whenever I look at new Apple products I always have the back of my head the thought that I don't want them just because they are so closed off and limited. And above all Steve Jobs is just a bad guy. I wonder how many products Bill Gates has named after disowned children?
While I get your point, I still think you're an abysmal idiot. People care about having control over their computer the instant it does something they don't want it to.
Under the influence of Post-Cyberpunk Gonzo Journalism
In the Linux world, there are 'undocumented APIs' everywhere. Unless of course, one considers a .h file to be documentation.
-- In the beginning was the WORD, and the WORD was UNSIGNED, and the main(){} was without form and void...
I've been at a talk where the lecturer mentioned that we would, of course, recognize 10.99 as being "approximately seven-halves pi".
It seems quite clear from the comments that this article is a load of crap, yet it still hangs around on the front page, giving skim readers (the majority) false info. Integrity matters, and having user submitted content doesn't change that -- it's still sloppy journalism to let it be published.
Technically it's X Window, not X Windows. :-p
Actually, I'm quite familiar with X, but when I read the post, I didn't read it to mean 'X Windows', 'X Window', or 'OS X'. I thought it just meant, "insert something here", like a wildcard in the sentence or something - kind of like, Mr X.
Max.
1. Setting browser and RSS preferences: Choose Preferences from the Safari menu. Click the General Tab and select a default browser from all those installed. Next, select the RSS tab, and choose a reader aong the plethora you have installed. Quit, and you never have to use Safari again for browsing or RSS if you don't want to.
2. Setting e-mail software preferences: In Mail, choose Preferences from the Mail menu. Select a default e-mail program. Quit, and you'll never have to use mail for any e-mail tasks again.
I mean, you must not have even looked for this - these settings have worked (and well) for me for the past three years, at least - but then again, you comment was pretty much a troll anyway - "Apple does this and does that, they suck!"
Along with several other minuses, such as "Just Plain Wrong", "Talking Out of His/Her Ass" (yes, there are women on Slashdot, and yes, there are naked pictures, too), and "Obvious Fanboy/Hater". On the other side, there really ought to be a [+5, IAWTC].
Haec merda tauri est. Ceterum censeo Carthaginem esse delendam.
proud caffeine whore
Except in this case Apple provided a Technical Note that detailed the exact steps you'd need to follow to implement this feature. The only thing that was undocumented was an *alternate* but *functionally identical* way to do it (i.e. doing it from code as opposed to from program config).
It's either "X Window System" or just plain "X".
HAND.
"Edit: Slashdot seems to have picked up on this, and in typical style, has completely misunderstood the post. To be clear, I do not think that Apple is in any way trying to purposely "cripple" non-Apple software. 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."
Slashdot editors - can we drop the sensationalist titles/summaries and stick to reporting the facts?
Dan
Hopefully, honest people also, when they "reveal" an interface they consider to be an internal interface subject to change, and then have devlopers whine at them that an update broke their (application, plugin, etc.) because the interface changed, are in a position where they can be honest enough to say "tough shit" to the whiner. If not, that really removes an incentive to be honest.
(That isn't necessarily the only reason to keep secrets, but it's one reason to keep secrets. I get the impression that Linus, for example, is more than willing to say "tough shit" if somebody writes kernel code that assumes the kernel will always work the way it does now and has their code breaks because it starts working differently; if he says "tough shit" in that case, my sympathy would entirely be with him, not with whoever's software breaks. Don't want your software to break? Don't use interfaces that the supplier of the interface doesn't guarantee won't change in an incompatible fashion.)
I just thought people were trippin' balls on X.
It was not stupid for Microsoft to put the competitors to MS Office at a disadvantage on MS Windows 95, it was the second most brilliant business decision they have ever made. [ The most brilliant being their cheap non-exclusive license of QDOS to IBM. ]
But it was, or should have been, illegal.
It's ridiculous to try and use this insane rationale in regards to any company that's not Microsoft. At what point do you then start going 'well, actually I've decided they have enough market share now, NOW they should be ethical'
Apple isn't the dominant platform.
:)
Apple haven't integrated Safari into the desktop.
Safari can be removed.
Apple aren't trying to kill off Netscape
Undocumented does not necessarily mean secret, commercial companies have timescales.
Safari is based on open source software.
"Edit: Slashdot seems to have picked up on this, and in typical style, has completely misunderstood the post. To be clear, I do not think that Apple is in any way trying to purposely "cripple" non-Apple software. 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."
This pretty clearly sums it up.
I think one of the main reasons acronyms are frequently used on slashdot boils down to the pressure of posting a slashdot comment as early as possible.
After all, the longer it takes to post a comment, the more comments it will be competing with and the chances of it being read (modded up) dwindle.
In fact, even if this was a great comment by now the chances of it reaching +5 Insightful are pretty slim.
Maybe great late comments do deserve more generous attention though.
Seriously though, your post was really hard to read. When you referred to OS X as "X", I was thinking "X Windows". Please, for the sake of everyone here and Slashdot reputation, declining or not, refrain from using such atrocious techniques. Really, who uses "%" instead of typing "percentage"? It's not that hard. Speaking about "X", Apple X11.app on Leopard has some amazing performance level, it seems it uses every single evil undocumented , secret API to make Konqueror 3.5.8 (not 4 even) draw even faster with less CPU than Safari on some cases. Until this massive scandal uncovering, I had no clue about its reasons. Now I know, Apple also hits Firefox via superfast X11 Konqueror, Opera 9.x and 9.5beta which is Qt4 application itself.
Oh wait! It is open source
Edit: Slashdot seems to have picked up on this, and in typical style, has completely misunderstood the post. To be clear, I do not think that Apple is in any way trying to purposely "cripple" non-Apple software. 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.
His finding is that there is a beamsync synchronization, which can possible cause rapidly updating displays to slow down. There are some yet undocumented calls in the Webkit library that allows software to deal with beamsync.
Well I use it about 50% of the time.
Quote from the article:
... in typical style, has completely misunderstood the post."
"Edit: Slashdot seems to have picked up on this, and in typical style, has completely misunderstood the post. To be clear, I do not think that Apple is in any way trying to purposely "cripple" non-Apple software. 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."
Slashdot has a reputation: "Slashdot
It amazes me that, after all these years, Slashdot editors still apparently do not do any research before they post the stories. That has reduced the value of Slashdot as an advertising medium enormously.
"Jobs won't sell it to you until he's sure it rocks."
This is one of the most enlightening things I've read here in a while. I've never understood why people get so attached to the Mac platform. Macs have build-quality issues (for example) like any other brand, but I suppose I can see how Apple fans buy because they know that they're getting a product that, at the very least, Apple is sure is awesome. I've never really gotten the foaming-at-the-mouth fan-boy thing for ANY brand, but this at least explains some of the brand loyalty for Macs.
"So the next time you feel the need to abuse someone just because they use a Mac, ask yourself instead why you hate that they use the Mac. What difference does it make to you?"
While I don't go out of my way to abuse Mac users, I do find myself getting defensive around Mac users by default, which I suppose can lead to a sort of abuse-in-retribution. My desktop is a assembled-at-home affair, and my laptop is a Dell XPS, and both run Windows Vista Ultimate. The laptop (Dell + Vista) is like wearing a bullseye on my forehead when Mac users are around, and I'm constantly berated by "Mac-heads" over my choice of computer and operating system.
Of course, the Dell machine I use was virtually the *only* discrete graphics option in the 12.1" formfactor at the time that I bought it, and Windows affords me the opportunity to take advantage of that hardware (in the form of gaming). Now, to be fair, I could game in Linux, and I have. However in windows I can easily do things like undervolt my processor, overclock my video card and, in the end, get the maximum amount of gaming and battery performance out of my tiny, under-powered machine.
The point is that I take crap from a number of Mac users for not using a brand that doesn't have a machine in its lineup that meets my needs! The Macbook and Macbook Air, while both relatively small (although still bigger than an M1210) don't have discrete graphics. That's the end of the story for me. If they offered an option that suited me, I'd consider it.
Now, one could argue (and some of my Mac using friends have) that they abuse "PC" users because PC users abuse them. In the end this may just be a chicken/egg thing.
What I don't get it why people can't just be happy letting people choose for themselves. I absolutely approve of giving, say, a Linux Live CD to someone who has never tried it, and I've converted a number of friends to Linux even though I don't use it much myself. Exposing people to new options is admirable. Abusing them for their choices is not.
Sorry, this ended up coming off as more of a rant than an insightful comment.
The thing with Apple apps with Apple aesthetics is they look good and work well... with other Apple apps with Apple aesthetics. As an Apple user who isn't part of the fanboi crowd (I need Final Cut Pro for my job) who also loves Ubuntu and uses Vista on a daily basis, I can say that Apple does not care about the Windows environment, or any environment other than OS X. Whether that's a good or a bad thing is up to you, but they just don't.
iTunes for Windows is basically just a gateway to tap into the wallets of all the Windows users who want to use iPods and the iTunes store, and uses that as it's selling point, not it's speed or it's aesthetics in terms of the Windows desktop. If you want a media player that fits into the Vista desktop and uses system APIs to minimise memory footprint, use Windows Media Player. If you want to go crazy and use as little memory as possible, use Foobar2000, and if you want your media player to fit into any desktop you can possibly think of, use Winamp and a skin database. That's what those apps are designed for. iTunes for Windows is really ported as casually as possible without really caring about memory usage or how it integrates into the Windows desktop (it doesn't), because it's just there so Windows iPod users can buy iTunes songs.
On OS X, it's a different story. iTunes really doesn't hog a great deal of memory on my MacBook, and it integrates into the desktop beautifully. That's no great feat by the Apple devs, they've just made all the apps stick to the same theme, and iTunes looks a lot sleeker without the badly tacked-on menu bar that the Windows version has. It's widgets are native, which means they're faster and take up less space in memory. I've used iTunes on Windows and have noticed how much of a hog it is, and how dog slow it is when scrolling through a large (10,000+ track) library, but that doesn't mean that Apple can't make good applications, it just means that, when I'm on Windows, Apple doesn't really care about you or me, unless we're somehow giving them money via the iTunes Store. On OS X, iTunes scrolls just fine through the same library, so it's just a lazy port, not bad programming across the board.
Dealing with lawyers would be a lot less tedious if they all looked like Casey Novak.
IATWTC? I Ate the World Trade Center?
toresbe
Don't blame your own shortcomings on the OS ;p
Actually - this is a good point. These are well known shortcuts to anyone who's been using a Mac for a while, but most newbies (anyone switching in the last 15 years is a newbie in my book - hehe) don't find them, because they're not documented AFAIK - at least not by Apple. Because of this, it's one of the more common sorts of FUD I see bandied around about OS X, that it's mouse-centric.
There are actually very few occasions where you have to reach for the mouse - most things can be done purely with the keyboard, and for those things that don't appear to be possible with the keyboard may well be utilised by adjusting settings in Universal Access and Keyboard System Prefs, including setting up your own global and application level kbd shortcuts.
Oh, and if you think you have to use the mouse to open menus, think again. Try hitting Ctrl-F2. That'll highlight the Apple menu (Esc to exit menu highlighting), then either cursors to navigate or start typing menu name and it'll jump to it, and same within menu items. Hit return to select highlighted item.
There are many undocumented shortcuts. Hitting Option-{special key} (where {special key} is one of the media keys such as volume/brightness/expose etc) will open that particular function's System Pref Pane. And then, of course, you could always opt out of the GUI altogether if you really are that hardcore and live your life in the Terminal... heh! So there you go... hope it proves useful :D
They actually are documented. If you go to the "Keyboard Shortcuts" tab in the Keyboard and Mouse preference pane in System Preferences, there's a pretty long list of the default key sequences. You can even globally edit them, and add new ones. (It's even possible to say, globally override something like the "Copy" shotcut in all apps, or add shortcuts for common menu items that don't normally have them)
You can also turn on "Full Keyboard Access" there which enables tabbing between all controls like most non-Mac users expect.
Too bad you haven't read TFA. Let's try one more time:
It's not an undocumented API. It's an alternate way to handle a possible problem, that it self could lead to further problems. Apple has documented all this.
You are an opensource troll.
OK, now?
I also use it 50 percent of the time.
Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
Whenever someone brings up Slashdot's journalistic integrity, I'm reminded of CmdrTaco's World of Warcraft rant from a few years ago, Blizzard Made Me Change My Name. An entire 12-paragraph article because Blizzard made him change his name for using a title in it (Cmdr), which is against the naming rules. That CmdrTaco thought it was news, or that he felt so slighted that he thought he'd "strike back" at Blizzard by posting an article about it on Slashdot because he's CmdrTaco of Slashdot, gosh-darned it, just really showed me how immature and lame this site is.
The headline "Mac OS X Secretly Cripples Non-Apple Software" will go out on all the feeds. A lot of people won't even read the article. They'll look at it and say "See, typical tyrannical Apple." They may skim the summary and head straight for the comments. And they will be unknowingly misinformed.
"Sufferin' succotash."