Re: Reboot? Slow First Run
Re: Reboot? Slow First Run
- Subject: Re: Reboot? Slow First Run
- From: Shawn Erickson <email@hidden>
- Date: Thu, 3 Dec 2009 07:38:11 -0800
On Thu, Dec 3, 2009 at 3:47 AM, gMail.com <email@hidden> wrote:
> Hi,
> my app executes a given task in 1.2 seconds, all the time. I can quit the
> application, relaunch it, run the same task several times and it always
> takes 1.2 seconds.
> But if I reboot the machine, I launch the application and run the same task
> for the first time, it takes 13 seconds! This problem occurs at any reboot.
> Then if I run the task again it always takes 1.2 seconds.
The OS maintains a cache of data in RAM as much as it can while
running. This "universal buffer cache" caches pages of data from
loaded files, applications, etc.
So the long initial load time is likely a result of having to load the
data you need from disk (and possibly bringing online services your
application needs that haven't yet been needed by other applications).
The later load times are loading data from cache hence much much
faster.
-Shawn
_______________________________________________
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