Re: Library loading policy on Mac OS X with Cocoa
Re: Library loading policy on Mac OS X with Cocoa
- Subject: Re: Library loading policy on Mac OS X with Cocoa
- From: Chris Hanson <email@hidden>
- Date: Tue, 26 Jun 2001 22:17:19 -0500
At 8:07 AM -0500 6/26/01, Eric Peyton wrote:
Because if it loaded it at application launch then *every*
application, including those that NEVER make a sound would incur
that startup/launch penalty. Everyone wants there apps to launch
faster, not slower, and in order to do this, less code needs to be
loaded at launch.
I completely fail to understand this position.
On Mac OS 9, every reference to a linked library is fixed up at
launch time. The same is true for Windows, Linux, Solaris, BeOS, and
pretty much every other platform out there. In fact, on Mac OS 9 if
you have virtual memory turned off (as I do) you don't even get
demand paging of libraries or executables -- everything is physically
loaded into RAM at launch!
Yet on all of these platforms applications launch in a small fraction
of the time they do on Mac OS X. On the same hardware, it's faster
(if Classic is already running) to launch a Carbon application in
Classic than it is to launch it natively. I shudder to think how
long a native version of Microsoft Word will take to launch on Mac OS
X; Word 2001 takes 6 seconds from double click to blank document on
my 300MHz PowerBook G3 running Mac OS 9.1.
I think there's probably a subtle, fundamental piece of functionality
that's broken in the application launch functionality in Mac OS X.
Once it's fixed I expect things will get much better and we won't
have to use silly hacks like lazy loading of libraries and lazy
import resolution to get it around it. (I bet it's one of those
performance bugs that's just spread out enough that it's difficult to
see with profiling too.)
-- Chris
--
Chris Hanson <email@hidden>
bDistributed.com: Making business distributed.
Personal email: <email@hidden>