Re: First slow, then fast
Re: First slow, then fast
- Subject: Re: First slow, then fast
- From: Creed Erickson <email@hidden>
- Date: Sun, 3 Aug 2003 17:49:44 -0700
On Sunday, August 3, 2003, at 03:57 PM, Lorenzo wrote:
The first time I launch this search, it takes 15 seconds.
The second time, and all the next times it takes 2 or 3 seconds.
WHY?
Because the first time around the file system caches enormous amounts
of data from the directories and files. The second time around the file
system is able to pull this data from cache rather than having to read
it from disk. The fastest I/O is no I/O. Your first execution
"pre-heated" the cache for the second run.
I don't think it's because of the cache, because I start a search any
time.
Huh? I don't understand this comment. What time you start a search has
nothing to do with it. It is a function of what file system data is in
the cache.
---
Creed Erickson <email@hidden>
"Not a shred of evidence exists in favor of the idea that life is
serious."
- Brendan Gill
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.