Does PPC suck or has Apple crippled Cocoa ?
I have a large Openstep application that generates frames of graphical
animation at a reliable 20 Hz on a 266 Mhz Pentium II machine running
Openstep 4.2 with 64Mb and a 5 year old graphics card. The same application
when ported to a 450 Mhz G4 cube running with 384Mb OS X can not reliably
maintain 10 Hz. The application does not touch the disk while rendering so
disk I/O is not a factor.
I assumed something in the display routines needed different optimization
given the changes needed to port to Quartz. I disabled all drawing to find
out if the application could maintain 20 Hz even if it was drawing nothing.
Much to my horror, the application only picked up about 2 Hz.
I have profiled the code to a limited extent. (The tools don't work right
on OS-X) Most of the application code in the OS X version uses about half
the percentage time that it used under Openstep. For example,
if -evaluateScalarExpression: used 8% of the time on Openstep, it used 4% on
OS X. The Foundation Kit classes use 3-4 times the percentage that they
used under Openstep. In other words, if objectAtIndex: was consuming 4% of
the time in Openstep, it is consuming 12-16% under Mac OS X. (I know the
figures don't add up. That is what I mean when I say the tools don't work
right.)
Using percentage of run-time tells us the Apple Foundation code is much less
efficient than it was under Openstep.
The even worse news is that the new code is slower in absolute time also.
According to propaganda, the PPC at 450 Mhz should be 3-4 times faster than
a 266 Mhz Pentium II. In fact, most of the application code (Not Apple's
code)
executes in approximately the same number of milliseconds on both machines.
The machines are apparently comparable in hardware performance. The OS X
Foundation libraries are much slower than the Openstep versions. OS X may
me adding overhead that Openstep did not add. All together, I would say
Apple has made a huge step backward.
So, is the problem PPC ? Is it OS X ? Is it both ?
Also, all tests were performed with as few processes running as possible and
no classic environment on the OS X machine.
P.S. I don't trust the profiling on OS X and I would not believe its numbers
if the stopwatch did not basically corroborate them. We have some timer
code in our application. At various interesting stages in the animation
process, time stamps are written into a data structure in RAM. At the end
of a render session, the data structure is analyzed and a report is
generated to indicate how many milliseconds where used cumulatively in each
phase of render. On the Openstep 4.2 version, all phases combined use about
41 ms/frame leaving a bit of slack to keep the 20 Hz requirement. On OS-X,
the phase that moves lots of data around in memory takes 40ms/frame all by
itself! Does memcpy() suck on OS-X ?
> Does PPC suck or has Apple crippled Cocoa ?
Keep in mind your code might just suck, too. :-)
I suppose you could say they crippled Cocoa. There's a lot of new
stuff in OS X which, at this early stage, is almost certainly
inefficient. I don't know if the major suck comes from debugging code
or the Core layer or Quartz or what, but it certainly isn't as polished
as OPENSTEP was. It shouldn't be as bad as what you're seeing and it
should improve over time, so you might want to optimize around Cocoa in
the mean time. Q3A seems to run pretty good, so it's not like you
*can't* get performance out of OS X.
I'm half tempted to get GNUstep going on Darwin and benchmark that. :-)
You might want to see if you can get a version of Liberace before
Public Beta. For some reason between the not-so-public versions and
Public Beta, Apple gutted almost all of the Cocoa stuff and damaged
and/or crippled it. Up until then I think most of the Cocoa stuff was
still using the OPENSTEP code base.
If you look around the net at various Liberace apps, you'll see a lot
of them reporting that their apps stopped working after Liberace PB
came out, and haven't worked since.
hos...@tron.saturnhost.com wrote:
>
> >Does PPC suck or has Apple crippled Cocoa ?
>
> You might want to see if you can get a version of Liberace before
> Public Beta. For some reason between the not-so-public versions and
> Public Beta, Apple gutted almost all of the Cocoa stuff and damaged
> and/or crippled it. Up until then I think most of the Cocoa stuff was
> still using the OPENSTEP code base.
It looks like something got lost in the translation to CoreFoundation.
> If you look around the net at various Liberace apps, you'll see a lot
> of them reporting that their apps stopped working after Liberace PB
> came out, and haven't worked since.
WTF is Liberace? Another rev of OS X?
-jcr
It's just a more common name for MacOS X. It also refers to the MacOS
X, and not MacOS X Server.
More common? Maybe in your alternate universe. You're the only
person I've heard use THAT name for Mac OS X. The rest of us know
that was really the code name for the USB based candelabra project
Apple was secretly developing, until it's unfortunate recent cancellation.
Mike Paquette
> USB based candelabra project
What was that about? Edible?
****
Ziya
Actually, I've heard "Liberace" used frequently to describe all
versions of MacOS X after MacOS X Server 1.2 (The ones based on
Darwin). Sort of a follow-up to "Rhapsody" while keeping the musical
theme I guess.
--
Robert Doss
<r...@doss.org>
> USB based candelabra project
Not to fear, although Apple's was cancelled, there's an up-dated, fully
electronic of this available, the USB Flexlight ``Illuminate Your Workspace''
available from www.mcetech.com
William
--
William Adams
http://members.aol.com/willadams
Sphinx of black quartz, judge my vow.
Oh yeah? Then explain why my OS X box was half full of rhinestones
and sequins?
Huh?
Smart guy.