Re: Reboot? Slow First Run
Re: Reboot? Slow First Run
- Subject: Re: Reboot? Slow First Run
- From: Jens Alfke <email@hidden>
- Date: Thu, 3 Dec 2009 11:20:42 -0800
On Dec 3, 2009, at 9:55 AM, gMail.com wrote:
I can't really know whether I can modify that schema and unify those
10,000
files in one. I will ask the supervisor. Those files contain UT8
text and
other data like images...
You don't have to modify any schema. Just build an index file, e.g. as
a sqlite database, and use that as much as possible for speed-
intensive tasks.
(This gets a little more difficult if the 10,000 underlying files can
be changed without warning; but I believe that testing the mod dates
of the files will be a lot faster than having to read their contents.
After launch, you can use FSEvents to detect you need to rescan.)
As far as the speed at listing a folder content, I mean that despite
to the
various improvements in the technology, I can't yet see the speed I
expect
from a machine today when I open a folder.
As Bill said: "the technology" involved is hard disks. These have
gotten faster in the past 20 years, but the worst-case aspect (the
seek time) has only increased by something like a factor of *two*.
Whereas everything non-mechanical has sped up by a million or more.
However, since the old disk technology
is still largely used on Mac and this technology is still slow, I
shouldn't
have designed the Finder that way.
Please don't make naive comments like this; it just makes you look
foolish. I know we engineers all have a natural tendency to assume any
problem we haven't personally worked on is trivial, but you really
have to keep that in check.
You're talking about an extremely involved stack of code going from
the Finder through CarbonCore, BSD system calls, the HFS+ filesystem
code, the HFS+ on-disk format, the Darwin unified buffer cache, the
device drivers for the disks, and finally the firmware on the disk
controllers (yes this makes a difference.) All of which has been
obsessively pounded on for years to make it work faster.
Saying out of nowhere that you could design this better is absurd.
Check out the Darwin sources, get Singh's "Mac OS X Internals", look
up some docs on filesystem design and the characteristics of hard
disks, and study all this for a few months before you decide you're
smarter than the people who wrote that stuff.
(Yes, this is a pet peeve of mine. I have not worked on the Finder or
filesystem, but if you want to tell me how trivial it is to parse RSS
feeds or write an XMPP client, then give me a whiteboard and an hour
and I can dissuade you of that.)
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden