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.
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.
No, but this is how they became one.
And is that the answer to everything is it? They can do anything that they feel like purely because they are not the dominant player... so all of Microsoft's underhanded playing early on when they weren't the dominant player is all excusable too is it?
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'
Bar and truly humbug
Monopoly or no, it's undeniable that using secret APIs to give your own software an edge is anti-competitive. Not having a monopoly on the desktop market might mean that it's not illegal, but the legality has no bearing on the ethics.
"Live as if you'll die tomorrow." Ridiculous. You could die later today.
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?
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?
Thanks for posting this, I was just about to post it myself. This whole story stinks of sensationalism. Do people really think that the webkit and OS X developers sit together in a room and say "Ah.. how can we screw all those 3rd party application makers?". These types of APIs are usually undisclosed because you shouldn't depend on them. Anyone who reads The Old New Thing knows that it's a big problem for Microsoft as well, where developers go digging for some "hidden" APIs only to have their applications break in a future revision of the OS because it wasn't meant to be used.
There is a public way to do the same thing. They just added a total hack to the API to automatically do something by default when WebKit is embedded, instead of requiring a configuration value to be set. They didn't want it to be publicly available since they want the call to die as soon as they figure out a better way to do it. This isn't MS style stuff. There is no hidden feature. You can run the exact same code in a public way, and the it won't break when your user upgrades WebKit.
So, no, you aren't getting it right.
Yeah, that's pretty much exactly why I posted it. IMHO, Apple has been quite good with private APIs. In a major upgrade, they tend to all either become public (often after changing), or die. MS has had a less open history, and I think there are some very valid complaints there, but some are certainly overstated.
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.
How is the use of an API in an open-source project "secret"?
W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
Webkit is a framework that is open for anyone to take and put into their own application. Safari and some components of Mac OS use WebKit for their own rendering of html. There is no private, "better" linkage to WebKit, there is just a hack within the WebKit framework that is there so that other applications using WebKit will not have problems with it. The Apple developers knew the internals of the operating system well enough to do this semi-safely but even they aren't happy with themselves doing it because it can still cause problems.
There is also a public, safer, more documented way of doing the same thing for applications that don't use WebKit. This public method is not perfect either but it is much safer. The Apple developers are keeping parts of the operating system under wraps which could cause major problems if you don't know EXACTLY what the internals are doing. This is a very common thing for responsible developers to do, you don't want to expose API that could fail catastrophically if something isn't set up just exactly correctly.
In short, nothing to see here, the public API is the safest bet to use. If you choose to use undocumented methods for a bit more speed then you risk bringing down your application in a hard and messy way. The WebKit developers weighed that in their own minds and decided that the risks were worth it, since they had a hand in developing the undocumented methods and could account for the quirks in a semi-safe manner.
In the case of Internet Explorer, Microsoft had a separate set of completely safe API that were optimized versions of methods other developers got to use. If you were an internal Microsoft developer you could do more with the internal API than anyone could with the external API. This was done deliberately so that Microsoft products could get preferential treatment on the Windows operating system. Microsoft also made it so that you couldn't easily use Windows without having some part of Internet Explorer as part of the system. Under Mac OS X you can remove every mention of WebKit and all that will happen is a couple of programs won't work until you re-install them with their embedded versions of WebKit.
Sapere aude!
No all they need to say is
"It's an undocumented feature. We're not going to document it because we don't want to support it. Feel free to use it, but don't bother complaining when it breaks sometime in the future."
NZ Electronics Enthusiasts: Check out my Trade Me Listings
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.
Yes! There definitely needs to be a -5 learn to fucking type mod.
More to the point - there is a public API that can give the same effect (which is used in Firefox 3). Yes, it turns out that WebKit has a similar, but different method - but it's not an advantage that's just for WebKit.
The FTA even makes it clear - FF3 got the speed advantage they wanted, using the public API. The FTA even has an addition making it clear that the Slashdot article is taking the wrong slant. 'nuff sad.
"Software is too expensive to build cheaply"
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.
Apple not being a convicted monopoly, this may be an acceptable practice, but technically, this is exactly the same thing (actually, one of many things) people accuse MS of, regardless of the underlying motive, and to argue that this is somehow different is dishonest. You seem to be repeating yourself and you got it wrong again.
The WebKit team has created a framework which is free and open for anyone to use. In order to make this framework as compatable as possible they used some undocumented methods in Quartz, the drawing layer of Mac OS X. Yes, they are also Apple developers and they have intimate knowledge of the internals of Mac OS X. This is why they feel reasonably safe in doing something as unsafe as using undocumented methods for means which they were never intended. They didn't do it because it provided some sort of advantage to WebKit over other applications, they did it because it kept WebKit from breaking some applications that embedded WebKit.
The Mac OS X developers also have a documented, public way of doing this very same thing and the Firefox developers used it. It worked well and everyone is happy now. In fact when you compare the public way of solving the problem and the behind-the-scenes way of doing it you find that the behind-the-scenes way is much more difficult to work with and more likely to have problems down the road.
Microsoft, on the other hand, has a history of developing two different layers of its API, both of which are equally safe. The private API is only shared with internal Microsoft Developers and is much quicker/easier/more efficient than the public API. This is what has gotten Microsoft in hot water before.
It's a far cry to say that Microsoft's dual API is at all comparable to Apple's public API and the undocumented methods being used here. If Apple was truly doing the same thing as Microsoft then the undocumented methods would do the job more easily and efficiently than the public API. They don't, they are just a hack that only an internal developer could come up with to make sure OTHER people's applications keep working well. If you look at the developer's (David Hyatt's) comments he even says that they don't use this hack in Safari, Apple's own web browser. It's meant so that other people's browsers can work well.
I'd say the dishonest thing here is your feigned innocence over your comments. "I'm not trying to read too much into it." - yes you are! All of this was explained to you by several people in several different ways and yet you still came back to try to further muddy the waters. Just admit that either you have no clue about the whole situation or that you do understand the difference between Microsoft's and Apple's behaviors and you are just trying to stir up trouble.
Sapere aude!
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...
Or the SPI (System Programming Interface, the private equivalent of an API) takes advantage of inside knowledge of how some data structures are designed but which could change in the future as functionality is added to the class in question. For example, Apple might decide to change CFString to always convert data to BADC-byte-order UTF-32 under the hood for better efficiency on Vax. Not likely, but I never thought I'd see Macs using Intel CPUs, either, so you never know. :-D They could make such a change and still support the public APIs, but if they had an API that allowed you to arbitrarily manipulate the bytes under the hood, they'd be stuck.
The thing about Safari is that it is effectively insulated from SPI changes because it comes out with OS releases. If Apple needs to change an internal data structure in CF, Foundation, etc. in a way that would break an SPI, all they have to do is rev Safari to not use that SPI. Thus, it is safe for Safari to use any API or SPI. If Apple publishes the SPI as API, FireFox uses it, and Apple changes the data structure, Firefox breaks, and with "luck", so do Photoshop and Word.... :-(
So you see, Apple has only three choices: A. don't publish that portion of the API, in which case some people complain because they're not able to get that extra 1% from being able to walk inside private data structures of the HFS+ Extents B-tree or whatever, B. publish that portion of the API, in which case they're stuck with that internal architecture and can't ever change it to improve performance, add features, etc., or C. publish the API and break it later, in which case developers scream again. It's a no-win.
The only thing one could possibly argue is that Safari shouldn't be using the SPI, either, to put them on equal footing. That said, since it's safe for them to do so, where's the harm? There's no monopoly involved, certainly. :-) And as you noted, many of those SPIs that Safari is trying out might become APIs at some point in the future. Having an app like Safari exercise them allows the engineers to figure out what works and what doesn't so that they don't get stuck supporting an API that isn't scalable, is hard to enhance, or isn't easily maintainable. In the long run, everybody benefits.
I'm certain that Apple doesn't do this to cripple Firefox or to make its own software look better. It's not a vast fruit-wing conspiracy.... Apple limits its public API exposure to ensure that the APIs are sustainable so third-party code doesn't break. If you don't care about that, use the SPI... just don't come crying when your app crashes on launch after a software update or whatever.... :-)
Check out my sci-fi/humor trilogy at PatriotsBooks.
Great post.
I've been in product cycles where we've gone through exactly the dilemma you pointed out: where making an API public means supporting it until kingdom come, when the scenario is too new for the API to be stable, or you have definite long-term plans that will cause breaking changes in the API and you don't want the burden of having to be backwards compatible with applications designed for the older API.
The only part I didn't agree with was this:
The only thing one could possibly argue is that Safari shouldn't be using the SPI, either, to put them on equal footing. That said, since it's safe for them to do so, where's the harm? There's no monopoly involved, certainly.I think it should either be ok for all players to have internal APIs or not ok for all players. I mean, if we say that right now it's ok for Apple to do this because they are not a monopoly, what happens if they do become one? At that point do they get penalized for these internal APIs (using which they designed the products that helped them obtain the monopoly)? At what point will Apple cross a threshold at which they need to change this practice and how will they know when they have crossed it? And when this threshold is crossed, is it suddenly ok for MS to start this practice again (of having undocumented APIs).
There are no restrictions in OS X preventing you from using another media player such as Cog, VLC, mpg123 or really anything else that will compile and run on OS X. You also state that iTunes comes with OS X but not with Windows yet Windows comes with WMP but it doesn't come with OS X, oh wait! that's completely irrelevant!
The Dock in OSX is built in... In windows, you can dl docks made by various developers. Windows still could benefit from a dock feature being apart of a standard install.So somehow having a default UI feature that doesn't even come with another OS means you're a monopoly? Most 3rd party dock software I've seen for Windows has had some interesting bugs (haven't really used Windows in 1-2 years though).
OSX's disk imaging backup time machine thing... It beats the crap out of the Vista one, which is crippled due to the fact that MS would be sued in court for putting the competition out of business.Well, that's because MS is a convicted monopolist and Apple isn't, personally I use rsync+ssh to mirror data across drives and machines so I don't really know too much about their offerings but I've definitely heard of a couple of annoying limitations of Time Machine.
Vista has a terrible graphics viewer, where as OSX previews just about all file types right in the os.If anything that implies that Vista is the OS that is selling because it's based on abuse of a monopoly situation.
Apple makes the hardware, sells you the computer, and the OS. It is a monopoly, more so than Microsoft. Microsoft doesnt insist you buy their pc hardware direct from their own stores and then charge you for their os.Only if you're using some weird twilight zone definition of a monopoly, on the desktop computer market MS has a pretty steady grip of the market, Apple OTOH produce a complete system where they control both the hardware and the operating system, but saying that's a monopoly is like saying GM has a monopoly on the Chevy market.
Apple controls the distro of their hardware, software, and even f'n accesories. Apple Store anyone? iPod liscensed accessories....Once again, we're in the realm of Apple hardware/software, as for iPod licensed accessories that's just the typical "guarantee" that an accessory will work with the Apple product at hand and is something lots of manufacturers do.
Apple has had their end of things locked up for a while. They have a monopoly more than MS has. MS may have more installs, but Apple is an entire entity that is in complete control of its hardware, software and sales. They dictate prices to you. There is no competition with Apple hardware, or software. You have one place to buy it, and It's from Apple.Selling a complete system with hardware and OS tightly integrated is not a monopoly any more than selling a truck that comes with seats is a monopoly just because some other guy is selling just seats. Using this analogy may also help illustrate the idea that you're not allowed to run OS X on non-Apple hardware, it would be like telling people who buy extra seats for their trucks that those seats have only been verified to work with your trucks (while also using specials fittings for the seats to make it harder to just stick the seats in any old junk car).
/Mikael (IHBT IHL HAND)
Greylisting is to SMTP as NAT is to IPv4
What about the other option?
"The SPI namespace is subject to change with future OS releases, minor as well as major. Changes will be made public on this site at least two weeks prior to shipping an update with any SPI modifications. Enter your e-mail address to be auto-notified about all changes, grouped into two e-mails per week at most."
Developers have documented access to the additional performance those libraries might give them while knowing they might change. For safety's sake, the versioning could be included into the interface, allowing thoughtful devs to fall back to the (slower) API on a version number update. Also, the documentation could include some sort of discussion plattform allowing qualified devs to propose changes that might, after approved by the Steve and his Turtleneck, improve Apple's SPI (and, trickling down, the "stable" API).
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.
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.