Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Mac OS X Secretly Cripples Non-Apple Software

Soulskill posted more than 6 years ago | from the hand-in-the-cookie-jar dept.

OS X 559

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.

cancel ×

559 comments

Sorry! There are no comments related to the filter you selected.

first post! (5, Funny)

Anonymous Coward | more than 6 years ago | (#22596134)

first post!
i cheated though, i'm using safari.

Um, is this an emulation thing? (5, Insightful)

pedropolis (928836) | more than 6 years ago | (#22596224)

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?

From TFA... (1, Insightful)

djupedal (584558) | more than 6 years ago | (#22596232)

"Some of you may have noticed that the Firefox 3 nightly builds have felt a lot snappier since a few weeks ago. There's an interesting story in that, one that I finally have time to write up. We've had a number of bugs on the Mac where people were complaining of bad performance compared to Firefox 2,...
However, I'm glad that there was a workaround for this issue for us on OSX, because the performance benefits are huge -- Firefox 3 on the Mac (everywhere, really) is going to be a kick-ass release!"


So, there was no issue w/F'fox v2, and 3, already 'snappier', will be a k-a release when it comes out of beta.

So, where does the crippling come in? And why does it seem like a dev w/beta software is shifting the blame, especially when the dev admits X contained a workaround?

After all, just what % of Leopard was written in-house by Apple.

Article is a Troll (5, Insightful)

Anonymous Coward | more than 6 years ago | (#22596142)

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.

Re:Article is a Troll (4, Informative)

Architect_sasyr (938685) | more than 6 years ago | (#22596194)

And I thought that the Underhanded C Contest [brainhz.com] would never have come in handy......

Re:Article is a Troll (2, Insightful)

Anonymous Coward | more than 6 years ago | (#22596210)

if you use an undocumented API for something that does not mean you "cripple" other pieces of software
If the only difference is the performance, then that's *exactly* what it means.

Try pulling your head out of Steve's ass long enough to make an objective assessment before you post next time.

Re:Article is a Troll (3, Insightful)

MouseR (3264) | more than 6 years ago | (#22596314)

Foreword: I pulled my head out of Steve's ass when I unlocked my iPhone.

Now...

Maybe he's on to something though. You see, published APIs are APIs that are generally tested and well engineered (although that's sometimes arguable). The idea is that a published API can be relied upon for the foreseable future as being available and to do what it's documented to do.

Now, if Safari is using yet-unpublished APIs, it does so at a possible cost of futur compatibility and, even perhaps, worse performance down the line.

Now, obviously, Apple is in a rather sweet spot to use this because they have some inside info as to when things might get changed. Or at least, access to engineers that can fix it.

Using Cocoa/Objective-C for any APIs makes any framework (libraries) easy to dig into. There are THOUSANDS of unpublished methods in Cocoa classes. They're unpublished because they are not meant to be normal entry points for various reasons. They might be some internal data munger routines that end up being used by some public API but it's not to day that accessing this one directly wouldn't be a performance boost for something else, used in a different context.

There are tools you can use to find out what method Cocoa classes implement and if you really want, you can dig right into them. The cost, though, is that you risk futur incompatibilities.

That's probably what's going on in this case.

FYI: I also make use of some undocumented methods. There. let me give you one:

@interface NSScreen (_NSScreen_screenNumber)

- (int) _ScreenNumber;

@end

@implementation NSScreen (_NSScreen_screenNumber)

- (int) _ScreenNumber
{
        return _screenNumber;
}

@end

Oh noes! I gave you access to a method wich may give you an unfair advantage to a poor sap who'll have to traverse an array using an interator to get screen numbers!!!

For a counter argument, Apple is now as evil as the company it fought all these years. So, maybe they're just guilty of this one too.

Re:Article is a Troll (5, Informative)

truthsearch (249536) | more than 6 years ago | (#22596434)

Possibly confirming your post is this comment on TFA:

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.


Re:Article is a Troll (1, Insightful)

dfghjk (711126) | more than 6 years ago | (#22596468)

"Now, if Safari is using yet-unpublished APIs, it does so at a possible cost of futur compatibility and, even perhaps, worse performance down the line."

Funny, that's just what Microsoft said about their apps. What a risk Apple is taking!

Re:Article is a Troll (5, Insightful)

Anonymous Coward | more than 6 years ago | (#22596266)

Yes, the article is a troll at face value. Apple has every right to keep its API secret from 2nd and 3rd parties. It is true however that Microsoft has been widely criticized for not opening up its APIs that give Office, IE, etc. and advantage. What the article is doing is predicting that Apple will be given a pass by the development community, thereby allowing the author to scream "hyprocrisy!" Of course none of this has happened yet, except for your comment. So yeah, the article is a troll.

Re:Article is a Troll (2, Insightful)

Brian Gordon (987471) | more than 6 years ago | (#22596290)

No, it's reporting on Apple being evil just like microsoft-- and anticipating that Apple fans will defend it anyway. Nobody's vindicating Microsoft and slashdot still reports on MS's evilness, how is this a "HIPOCRISY!" trap?

Re:Article is a Troll (1, Interesting)

smitty_one_each (243267) | more than 6 years ago | (#22596594)

If there is any value in this for either company, it's highly tactical.
Keeping all sorts of APIs around is a maintenance nightmare.
Strategically, byzantine designs become their own punishment.
Maybe a Brit can weigh in, but I think it's ironic that Apple's external emphasis on design doesn't seem to carry through at the API level, at least in this case.

Re:Article is a Troll (3, Interesting)

Swampash (1131503) | more than 6 years ago | (#22596344)

True. It would have been much more accurate to say that Apple cripples every piece of software equally, and then secretly uncripples its own.

Re:Article is a Troll (0, Funny)

Anonymous Coward | more than 6 years ago | (#22596412)

Its not that Apple is using an undocumented API. Safari is just a browser that people are trying to clone or weaken before it stomps IE and Firefox into the ground.

Re:Article is a Troll (4, Insightful)

udippel (562132) | more than 6 years ago | (#22596420)

Yes and no. You are correct, using some new shiny and undocumented features for my own good does not primarily and automagically cripple others' products. But as secondary effect, those other products, in comparison, though effectively running at the original specs, look pale in comparison.

Since this is exactly one of the reasons how Microsoft came to dominate the software market, and had all major third parties kowtow to them (and pay) to get the information, the Free Market was distorted. It would not be the best/fastest application that grabbed the market, but the one with knowledge about and rights to the secrets.
I'd have to seriously disappoint you on this one: This is exactly not what the term 'Free Market' means, especially if you are already the monopolist.

You yourself might already have grown up, now try to work on your thinking abilities.

Article points finger in wrong directoin (5, Informative)

goombah99 (560566) | more than 6 years ago | (#22596424)

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...

The thinking is really quite simple: (5, Funny)

Valacosa (863657) | more than 6 years ago | (#22596144)

You don't really have to wonder what Apple is thinking, considering the kind of marketshare Microsoft has gotten for similar practices.
Fixed.

Re:The thinking is really quite simple: (1)

holophrastic (221104) | more than 6 years ago | (#22596214)

Nice! Wish I had the mod points to give you a most deserved boost.

*sniffle* (5, Funny)

Serenissima (1210562) | more than 6 years ago | (#22596286)

Awwwwww... our little system is all grown up now! Who's a good system? Who's a good system?

the difference (2, Informative)

mincognito (839071) | more than 6 years ago | (#22596148)

You really have to wonder what Apple is thinking, considering the kind of retaliation Microsoft has gotten for similar practices.
That they're not a monopoly.

Re:the difference (4, Insightful)

Anonymous Coward | more than 6 years ago | (#22596188)

No, but this is how they became one.

Re:the difference (5, Insightful)

spoco2 (322835) | more than 6 years ago | (#22596192)

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

Re:the difference (1)

Otter (3800) | more than 6 years ago | (#22596320)

And is that the answer to everything is it?

When it's a question of antitrust law? Yeah, it pretty much is.

In any case, I'm not sure what "the kind of retaliation Microsoft has gotten" the submitter has in mind. What "retaliation"?

Re:the difference (1)

Brian Gordon (987471) | more than 6 years ago | (#22596472)

How about everyone hates shelling out money for their products, if they do at all.

When it's a question of antitrust law?
It's a question of the only way Apple makes any money of their macs is word of mouth love and what we think of them on slashdot. If Apple turns into a big evil corporation, why not just buy Microsoft?

Re:the difference (3, Insightful)

urcreepyneighbor (1171755) | more than 6 years ago | (#22596204)

That they're not a monopoly.
<sarcasm>And Fidel Castro is a Freedom Fighter because the US is Evil - right?</sarcasm>

Microsoft simply did what any sane company would do. Apple's doing it now - probably have copied MS's tactics in a million other ways, because it makes sense.

Condemn Apple, too, or lose any creditability you ever had.

Garbage! (4, Insightful)

Jane Q. Public (1010737) | more than 6 years ago | (#22596540)

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.

Re:the difference (5, Insightful)

Valacosa (863657) | more than 6 years ago | (#22596208)

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.

Re:the difference (4, Insightful)

MightyYar (622222) | more than 6 years ago | (#22596582)

How is the use of an API in an open-source project "secret"?

Indeed, where's the advantage? (5, Funny)

Foerstner (931398) | more than 6 years ago | (#22596246)

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!"

Re:Indeed, where's the advantage? (1)

RetiredMidn (441788) | more than 6 years ago | (#22596532)

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!"

"And at $0 per copy, we'll make... Oh, never mind..." ;-)

Yes they are (1, Informative)

Anonymous Coward | more than 6 years ago | (#22596250)

Can you tell me who else sells Apple compatible hardware?

Hell, those monopolists even went after sellers of roms to kill emulators.

Re:the difference (0)

Anonymous Coward | more than 6 years ago | (#22596272)

That they're not a monopoly.

Microsoft has about as much monopoly on Windows operating system as Apple has monopoly over OSX systems. It's funny like that.

You may start talking market share and pull out silly car comparisons or what not, but the fact is, not many people care about the OS they use, they are instead forced to use a certain OS because of the applications they need.

I have Mac and a PC, and I have no particular love or hate for any of them. I didn't buy the Mac because it's superior, but because I need to work with files I can open and edit reliably only on a Mac.

As such when Apple pulls old tricks like those, I'm being hurt. I can't run and cry and move to Windows or Linux, since I'm locked in because of the apps I use.

It's really ridiculous that someone would call Microsoft more of a platform monopoly than Apple is.

Re:the difference (1)

Hemlock Stones (636570) | more than 6 years ago | (#22596274)

If you buy an Apple computer they are the monopoly.

Re:the difference (0)

Anonymous Coward | more than 6 years ago | (#22596302)

You really have to wonder what Apple is thinking, considering the kind of retaliation Microsoft has gotten for similar practices.

That they're not a monopoly.
Funny. An Apple browser that runs only on an Apple operating system that runs only on an Apple computer. You forget that half the definition of a monopoly is the scope of the relevant market.

Re:the difference (4, Informative)

cyfer2000 (548592) | more than 6 years ago | (#22596370)

From David Hyatt's reply [vlad1.com] , it seems that the webkit team as a whole somehow doesn't like this practice too. David Hyatt [wikipedia.org] was one of the original developers of Firefox and now he is working for Apple.

Re:the difference (1)

dfghjk (711126) | more than 6 years ago | (#22596498)

So that means Apple is ethical?

Proprietary software is monopoly software. (0, Redundant)

jbn-o (555068) | more than 6 years ago | (#22596504)

All proprietary software developers are monopolists. You can't get MacOS X from any other developer but Apple. Similarly you can't get Windows from anyone but Microsoft. Sure, many distributors will sell you a copy of either operating system but they are merely passing on a copy of what Apple or Microsoft published. Along the same line, users of non-free operating software are never in a position to fully control their computer. As someone recently pointed out, the users are never in the same class as the proprietor. When you run non-free software you put the monopolists in control.

Bastards (-1, Flamebait)

Jeremiah Cornelius (137) | more than 6 years ago | (#22596152)

There is really nothing in Leopard I want or need. It's Vista for the Cupertino crowd.

I am just now further committed to Fedora and Ubuntu then ever before.

Wait, maybe this explains why Mac Office 2008 SUCKS EVEN MORE than the previous versions performance - even when that ran under Rosetta!

MS/Apple. Two sides - same coin.

This would have been a First Post (4, Funny)

Anonymous Coward | more than 6 years ago | (#22596156)

... but I used a non-Apple browser.

<sigh>

Really? (1)

Ctrl-Z (28806) | more than 6 years ago | (#22596168)

This leaves me scratching my head, because I don't really see any significant performance improvement of Safari over Firefox. Sorry Safari fans.

Re:Really? (1)

starwed (735423) | more than 6 years ago | (#22596206)

If you read the article, there are two ways of doing this: Safari uses an undocumented API call, and Firefox 2 uses a documented config option which (apparently) isn't as flexible.

Firefox 3 wasn't using the config option (oops) and so was pretty slow. The blog writer noticed that Safari wasn't using the option either, and did some poking around to find out why.

Re:Really? (5, Funny)

Ctrl-Z (28806) | more than 6 years ago | (#22596280)

If you read the article...

You lost me there.

Re:Really? (2, Informative)

Anonymous Coward | more than 6 years ago | (#22596456)

Firefox 2 uses a documented config option

Wrong. The config option was effectively set automatically because Firefox 2 is a Carbon app.

Re:Really? (0)

Anonymous Coward | more than 6 years ago | (#22596240)

> This leaves me scratching my head, because I don't really see any significant performance improvement of Safari over Firefox. Sorry Safari fans.

Which version of Safari are you running?

"Safari 3.0 WIPES THE FLOOR with Firefox 2.0.11. It is SO much faster on my Mac than Firefox that it's not even funny. In fact, it's almost as fast as Firefox is on my AMD 5600+ (on either XP or Linux)!"
http://forums.macrumors.com/showthread.php?t=429183&page=8 [macrumors.com]

Re:Really? (5, Informative)

dal20402 (895630) | more than 6 years ago | (#22596294)

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.

Not quite the same as crippling now is it? (1)

thebrieze (1102809) | more than 6 years ago | (#22596170)

So Apple uses some undocumented OS features in their own products... how is that crippling other software?

Re:Not quite the same as crippling now is it? (0)

Freaky Spook (811861) | more than 6 years ago | (#22596358)

how is that crippling other software?

Everyone knows that Apple is the cool kid in the school ground, and everyone knows that when the cool kid brings a new shiny API to school every other program wants to use it.

These other poor little browsers are unable to use the new API and feel depressed, because they know they are not cool enough to use it. You know what happens to depressed programs, they work slower and tend to rebel against their users.

Depressed Firefox App: "HTTP request? HTTP request? Stuff you! Here's a friggin 404!! I hate myself!" *starts cutting self*

This has been going on since at least System 7 (0, Flamebait)

Anonymous Coward | more than 6 years ago | (#22596174)

Another form of this is when the engineers keep the API's undocumented then leave Apple and start their own company selling this great new software that is only great because it uses this still-private API.

It sucks and it's one of the reason I love working with Linux today.

Fuck Apple.

what they are thinking (2, Funny)

hildi (868839) | more than 6 years ago | (#22596176)

"dude, what is this call?"

"its undocumented.... "

"what? why is it undocumented?"

"well, i mean, i have submitted the form like 3 times to 3 different people. one said they would get back to me. the other said
it was in process. the third one said they had approval but they got fired last week"

"wow, thats ... ok. so wh... so how do we get it documented.... "

(interrupted by someone else coming in) 'hey did you guys get the memo about the server migration, we all need to be off at 3.07
and jim ... i need you to brief me on this change you made ... tom can i get that report on the thing you were working on last week?

"yeah but i finished that report and gave it to susan... she said shed give it to you asap"

"well she has been out with the flu.... normally that stuff goes to janice... but she is on vacation"

"well i left it on her desk..."

"well, i went by her desk but i didnt see anything... maybe she put it in her folder though, sometimes she does that'

"i could just email you a copy"

"well my machine is out for the rest of the day because of the upgrade...

"oh really? what are you upgrading to?

"well im getting another g of ram, just to work on that new thing from last month..

"oh so they decided to go ahead with that?

etc etc et c

Round Number? (5, Funny)

cobaltnova (1188515) | more than 6 years ago | (#22596180)

We're capping at 30.77 frames per second here. That's way too round of a number.
The author must be a mathematician.

It IS their right... (4, Interesting)

hackel (10452) | more than 6 years ago | (#22596184)

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...

Re:It IS their right... (1)

holophrastic (221104) | more than 6 years ago | (#22596268)

I agree whole-heartedly. I too own a business, I write software and provide solutions, and I'll be damned if anyone were to tell be what I can and cannot do with my own products.

That said, if I ran Apple, and this came across my desk, and I wanted to be civil about it, I'd say something like:

ah, that's not an undocumented feature, it's a bug in the documentation. It's a low-priority bug and will get fixed in a future version of the documentation.

By which point, of course, the feature would be renamed.

Re:It IS their right... (1)

that this is not und (1026860) | more than 6 years ago | (#22596398)

By which point, of course, you'd have either no customers left, or only staggeringly stupid customers.

Re:It IS their right... (0)

PrayerlessApostle (1192601) | more than 6 years ago | (#22596584)

I agree whole-heartedly. I too own a business, I write software and provide solutions, and I'll be damned if anyone were to tell be what I can and cannot do with my own products. That said, if I ran Apple, and this came across my desk, and I wanted to be civil about it, I'd say something like: ah, that's not an undocumented feature, it's a bug in the documentation. It's a low-priority bug and will get fixed in a future version of the documentation. By which point, of course, the feature would be renamed. So, if Microsoft had makes it so that every other browser on XP run slower compared to the evil monstrosity called IE6, then it would be fine? I really don't think so. You'd have people saying ranting and raving with the usual diatribe: "This is the last straw! Microsoft had better wake up or else everyone will buy a Mac or switch over to Linux!" But when Apple does it it's fine. It's there right. When Microsoft gives IE or WMP an unfair advantage by packaging it with their OS, then they get fined a couple billion. But when Apple does it it's fair game because they make trendy products.

Hmm.... (2, Insightful)

mouko (1187491) | more than 6 years ago | (#22596200)

Apple has been biting into M$'s market share. Are we really surprised that they've contracted a disease in the process?

you think they are wondering... (2, Interesting)

linuxpng (314861) | more than 6 years ago | (#22596202)

how the mozilla team is keeping up with speed in the nightlies w/o access to the hidden APIs?

As a programmer... (1)

PetriBORG (518266) | more than 6 years ago | (#22596220)

I don't think this is the first time Apple did this... Especially if you wanted to develop a "plugin" that would override the default Apple behavior for windows borders [unsanity.com] or other things... At least for a while. It seems likely that Apply may just not be 100% ready to release these features?

This could happen anywhere really, even on Linux (think Ubuntu's graphics drivers), that isn't to say that Linux doesn't try to be 100% freedom.

Please keep in mind I run only Linux and OS X machines at home and program professionally on the Linux/Unix platform.

Inflammatory Headline (0, Troll)

Anonymous Coward | more than 6 years ago | (#22596228)

The editors should be ashamed of themselves for allowing this inflammatory and wrong headline through. The summary and article says nothing of the sort, it's a conclusion and opinion reached by the submitter. The "secretely cripples" part is nowhere to be found in the article.

This site just continues to scrape the bottom of the barrel for yellow journalism and sensationalism. Do you guys have any shame?

And Windows? (0)

Anonymous Coward | more than 6 years ago | (#22596234)

You might as well say that Apple secretly cripples their own software on Windows. I wouldn't be surprised if iTunes was crippled to entice users to buy a Mac. It hangs so much that even Al-Qaeda would be jealous.

Bad Engineering (1, Troll)

metachimp (456723) | more than 6 years ago | (#22596236)

I never can get this quote quite right, but 'Never attribute to malice that which can be accounted for by stupidity'. These unpublished APIs were probably custom-built for Safari, and since Apple apparently has a wicked case of not-made-here, this is not a surprise. I don't use OSX, but I do use iTunes, and I can only conclude that Apple just does not have a priority placed on well-engineered apps. They look great, but on Windows especially, they are pretty pitiful. I am always amazed at how much memory iTunes takes up for itself considering what it does. If I fire up Windows Media Player, loathsome as it is, it uses up a fraction of the resources. I run a Postgresql database server on my laptopn for development, and it does not even approach the big ol' Homer Simpson ass print that iTunes does. I don't get it. Do they deploy some kind of bottom-up graphics library? A monstrous cache? What? For all the memory that sucker takes up, it sure runs ponderously slow.

Enough of that. Apple just doesn't make applications very well. They put all the resources into the UI, and skimp on the important stuff.

Re:Bad Engineering (0)

vux984 (928602) | more than 6 years ago | (#22596464)

Enough of that. Apple just doesn't make applications very well. They put all the resources into the UI, and skimp on the important stuff.

I can fix an application that runs slow and uses lots of ram with ram and cpu upgrades. I'm generally stuck with the UI though, so please, focus your resources there. It really is more important than you seem to think.

From the fucking comments (5, Informative)

norkakn (102380) | more than 6 years ago | (#22596244)

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.

Re:From the fucking comments (0, Troll)

oldhack (1037484) | more than 6 years ago | (#22596380)

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.

Bear with me, I'm not familiar with Mac OSX development.

So WebKit is tightly integrated with the underlying OS service like Internet Explorer is alleged to be with Windows. So, if you use WebKit, you benefit from the private, "better" linkage to the OS service, but if you don't, your performance (or perhaps other qualities) will suffer. Am I getting that right?

Re:From the fucking comments (5, Insightful)

norkakn (102380) | more than 6 years ago | (#22596458)

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.

Re:From the fucking comments (1)

oldhack (1037484) | more than 6 years ago | (#22596608)

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.

If the public interface allows you to do the exact same things the WebKit does via private linkage, it should be simple to remove the linkage within WebKit. Why the impliedly tortous wait for the call to die out? What else is calling these private methods, and why aren't they using the public API instead?

The gist is: is the private methods provide some advantage over the public ones?

Btw, the question of Apple apps on Mac having advantage over 3rd party app is a separate issue, Apple not being a convicted monopoly, but the main question remains.

Re:From the fucking comments (2, Interesting)

Part`A (170102) | more than 6 years ago | (#22596462)

Correct, at the cost of it breaking all the time, it's an ugly hack which they probably shouldn't have bothered with, do what they do at your own risk! The difference between them and MS, besides MS being a monopoly was the intent with which APIs were made private or not.

Re:From the fucking comments (1, Insightful)

Nimey (114278) | more than 6 years ago | (#22596526)

It's a natural consequence of object-oriented design.

I don't know if you've ever programmed an OO language, but the idea is that the program will have these things called classes, which are wads of code with associated functions and data (an object does certain things, and has certain attributes). Contrast to a C struct, which is just a wad of data.

Some of the functions and data will be public (though it's better practice for all the data to be private) and thus accessible by functions outside the class. Other bits will be private, and accessible only within the class. The reason is that it restricts the ways in which things can go wrong, e.g. a certain variable can only be modified by calling the class's changeVar() function, which has validation and error-handling built in, rather than letting any function put any old data in. Only exposing certain functions means that everything else in the class is an implementation detail, and programs using the class only need to maintain compatibility with a limited number of APIs (data X goes in, data Y comes out).

So Hyatt's explanation sounds quite reasonable.

Re:From the fucking comments (1)

Cameroon (16395) | more than 6 years ago | (#22596528)

Actually no, if you read that the WebKit/Safari team have to suck it up and deal with tons of maintenance problems ('many many hours of regressions'). They aren't getting anything _better_, just using non-public stuff to work around things that would otherwise cause problems within Safari/WebKit.

Which is basically the same thing that every other 3rd party developer does who finds a non-public call/api that meets some need or solves some problem. The only bit that, to me, is a little 'off' is that the Safari/WebKit team have better access to see what those hidden bits are.

Re:From the fucking comments (5, Insightful)

Graff (532189) | more than 6 years ago | (#22596612)

So WebKit is tightly integrated with the underlying OS service like Internet Explorer is alleged to be with Windows. So, if you use WebKit, you benefit from the private, "better" linkage to the OS service, but if you don't, your performance (or perhaps other qualities) will suffer. Am I getting that right?
No, you have it wrong.

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.

Re:From the fucking comments (4, Insightful)

TheVoice900 (467327) | more than 6 years ago | (#22596426)

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.

Re:From the fucking comments (5, Insightful)

norkakn (102380) | more than 6 years ago | (#22596478)

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.

Re:From the fucking comments (1)

roca (43122) | more than 6 years ago | (#22596496)

Hyatt's comment is fair but it doesn't really help. "This is why we don't want to expose the APIs", well great, but the fact remains that Webkit can use them and we can't.

People embed Gecko on Mac, and we want to work on Tiger too, so those needs apply just as much to us as they do to Webkit.

Re:From the fucking comments (1)

norkakn (102380) | more than 6 years ago | (#22596562)

http://developer.apple.com/technotes/tn2005/tn2133.html [apple.com]

Turn it off in the application that embeds the engine, but be warned that "by disabling coalesced updates your application can suffer from issues ranging from visual correctness to tearing during window updates." I really don't want to know how many hours the WebKit team spent trying to limit the things that broke by their hack.

Re:From the fucking comments (0)

Anonymous Coward | more than 6 years ago | (#22596522)

no matter how respectful he might be, i wouldn't take webkit first developer's word 100% when all said and done, its an unhealthy culture from apple.

Webkit now is bigger than gecko, do you call that super bloat?

maybe its time to move webkit out of apple's control. or stop pretending to be OSS.

WebKit Engineer's Response (0)

Anonymous Coward | more than 6 years ago | (#22596248)

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.

-- Dave Hyatt (from the blog's comments)

Display Throttling? (4, Insightful)

Talez (468021) | more than 6 years ago | (#22596270)

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?

Tag "alreadyfixed" (4, Informative)

The Iso (1088207) | more than 6 years ago | (#22596288)

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.

So? (1)

sigzero (914876) | more than 6 years ago | (#22596304)

The issue with Microsoft was not really about the API. It was about the integration. According to Microsoft you couldn't rip out IE and still have a functioning Windows. I can happily delete Safari and it affects nothing.

Re:So? (1)

dedazo (737510) | more than 6 years ago | (#22596484)

You try that with WebKit and get back to us. After all, IE is nothing more than a thin UI shell around MSHTML and a few other components.

Re:So? (1)

morgan_greywolf (835522) | more than 6 years ago | (#22596586)

The issue with Microsoft was not really about the API. It was about the integration. According to Microsoft you couldn't rip out IE and still have a functioning Windows. I can happily delete Safari and it affects nothing.


While there are integration issues, there really have been many API issues with Microsoft. One example is that back in Windows 2.x and 3.x days, Microsoft Word (and other applications) used an undocumented Windows API that allowed for background printing. This was a real issue back then because Windows itself had no apparent, documented support for it. And it's one reason why other office suites never were able to compete well with Microsoft Office. Word could do background printing, but WordPerfect for Windows, and (Lotus) AmiPro couldn't, at least not until Microsoft eventually exposed those APIs -- well after Office had already gained a dominant market position, though.

Dtrace (-1, Troll)

auzy (680819) | more than 6 years ago | (#22596316)

This is new news?? You'll notice its almost impossible too, to replace apple programs to default to other ones. Microsoft has Default program settings, Apple has nothing. Furthermore, Apple seems to want to cripple Java by maintaining only an old version, and have depreciated the Java-Cocoa bindings (or they may be gone by now) to try to force people to use Cocoa/Objective C instead it seems. You cant use Dtrace on their own programs, they break drivers constantly which aren't their own (Look at all the M-Audio stuff, constant breakage). Apple is no good, and I'm surprised this needed to make front page at all. It is old news!

Re:Dtrace (4, Informative)

byjove (567441) | more than 6 years ago | (#22596406)

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?

Re:Dtrace (wrong topic name) (0, Troll)

auzy (680819) | more than 6 years ago | (#22596474)

PDF's aren't hard.. Just saying, there is no single program to do it. In windows you can just select default email client, default webbrowser, etc. In OSX, you gotta go mess around with dozens of file extensions, go in and out of programs to do it. Your average crowd wont know how (it was one of the most common questions I had while working in sales, and with email program for instance, for a lot of people, it didn't stick for some reason, and many programs used OSX mail still). So no, maybe not almost impossible, just painful to do, and not obvious.

You Had Me Until "Sh*tfari" (0, Troll)

pippadaisy (196729) | more than 6 years ago | (#22596324)

As I was scanning submitter's prose in my feedreader on my MacBook Pro, I was seriously gasping aloud. Apple! Messing with my apps! Until I read the giggle about hobbling Firefox in favor of Safari.

I use Safari for one thing and one thing only: Pogo games, mainly because EA's developers can't figure out how to execute Java apps in FF for Mac and appear to have never heard of Camino. Aside from that, even Firefox 2's huge memory leaks pale in comparison to the RAM hog and crashtastic Safari, which has been known to bring down OS X in its entirety here. In my circle, only the most diehard Mac fanboys open Safari as anything but an accidental click (it does look a lot like the NeoOffice icon in the dock).

Pull the other one. It has bells on it.

We don't need your undocumented APIs. (0, Flamebait)

actionbastard (1206160) | more than 6 years ago | (#22596334)

Apple doesn't document some APIs that they use to make their software faster.
Mozilla guys bust their asses and STILL come up with a browser that is faster than
Apple's Safari and every other browser on the platform without those APIs.
So, what does that get Apple?
A slower browser and the disdain of their own developer base, again.
I use Macs at work and at home and have admin'ed a large network installation
of Apple servers and workstations for the last 12 years and I am never surprised at
Apple's attitude toward their customers. They make BillG and SteveB look like saints
by comparison.

The time is coming for Apple with their large Ed customers -especially in California-
that if they don't wise up, they're going to be replaced with the Asus' and Everexes
with their low-cost laptops and desktops.

When that day comes, I won't miss Apple even a little bit.

Re:We don't need your undocumented APIs. (2, Informative)

falcon5768 (629591) | more than 6 years ago | (#22596508)

If you RTFA and the comments left, you would find out the guy who wrote the article took two and two and made 5. There are no "secret" APIs, just unrelased ones because they are very crippled and not fully formed.

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.

another over the top headline (0)

Anonymous Coward | more than 6 years ago | (#22596352)

how does improving the performance of built in applications = crippling non-apple software. really editors, I should read Slashdot why ?

Call it,, a Customer Retention Program (1)

Bullfish (858648) | more than 6 years ago | (#22596374)

The when MS does something, it is a malicious bug, when Apple (or damn near anyone else) does something, it's a feature!

That said, when you buy something from a company these days, they want to bag and tag you and keep you there. Computer hardware and software companies have a large business advantage in that their products lend themselves particularly well to this game. Apple is (like MS) is notorious for lock-in.

RTFA! (2, Informative)

edman007 (1097925) | more than 6 years ago | (#22596378)

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.

reason for "secret" APIs? (1)

TRRosen (720617) | more than 6 years ago | (#22596386)

ya think think maybe this is a new unsupported API that is subject to change that Apple doesn't want to support yet.

PS using undocumented APIs is bad programing (unless your writing the APIs too) that can cause significant problems. Doing such is really against the whole idea of a standards compliant browser...we want everybody to follow standards on the web but we wont follow standards on the OS???

PPS this is nothing like MS's practice of having private API's that give functionality not available elsewhere.

No longer an object of scorn! (0, Flamebait)

PC and Sony Fanboy (1248258) | more than 6 years ago | (#22596440)

Well, I'm glad that from now on, Apple Fanboys will stop mocking me for buying a PC and using sony MP3 players. I mean, now that apple has jumped on the "screw the consumer bandwagon", they're basically sleeping in the same bed as Microsoft and Sony ... right? Yes, this topic was my motivation to make a slashdot account!

Re:No longer an object of scorn! (1)

bigstrat2003 (1058574) | more than 6 years ago | (#22596534)

No they won't. Level-headed Apple users weren't mocking you, so they'll probably continue to not mock you. Apple fanboys, like all fanboys, lack the capacity for rational thought, so they'll continue to mock you just as much.

Sorry bro, bad break for you. You're still gonna get mocked.

It doesn't do them any good... (1)

Jane Q. Public (1010737) | more than 6 years ago | (#22596444)

Unless and until Safari starts doing all the things Firefox does, as well as Firefox does them, I will stay with Firefox as my primary browser anyway.

Sorry, But Not So... (1)

superdan2k (135614) | more than 6 years ago | (#22596482)

Okay, I call bullshit! I use Safari and Firefox both on a very regular basis. Why? Because Safari grinds to a halt and gives me the spinning pizza of death on a regular basis. That's with an Intel Mac Mini, 2GB RAM, all the latest software update. Bottom line, Firefox SMOKES Safari (the only reason I use Safari is for its RSS reader). So don't give me this crybaby shit about "crippling non-Apple software" -- that would be the ticket right back to "Macs Suck Island"...

Mac Firefox Gripes (0, Offtopic)

Nova Express (100383) | more than 6 years ago | (#22596558)

I'd be more inclined to lend a sympathetic ear if they hadn't removed the "click-and-hold to bring up the Save-As Menu" from the most recent builds of Firefox, which has made it a notably less user-friendly browser.

I'd also be a lot more inclined to sympathy if the "Restore Previous Session" function weren't broken so badly that it tries to restart every download I've ever cancelled in the Download manager (including those from months ago).

And I'm a mac user who still uses Firefox because I've got the vast majority of my website passwords saved in it...

so tell me... (1)

Xenious (24845) | more than 6 years ago | (#22596572)

again why do I not like Safari? I'm probably just thick headed with the same reason I run IE7 on XP.

About time Apple starts (1)

prevajanje (1228134) | more than 6 years ago | (#22596616)

copying something from Microsoft,....

Sour Grapes (0, Flamebait)

stewbacca (1033764) | more than 6 years ago | (#22596618)

Gee, who would have thought that a web browser written by Apple for its own OS running on its own hardware would be faster than a collaboration of sloppy code written by crusader geeks that have been fighting Microsoft for the past decade (and not paying attention to Apple much)?

Using source code developed by your own company doesn't mean you are "crippling" other software. This is the most lame slashdot summary this month.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>