Re: why does this leak?
Re: why does this leak?
- Subject: Re: why does this leak?
- From: Daniel Jalkut <email@hidden>
- Date: Tue, 14 Feb 2006 17:45:25 -0500
In fact, it is generally extremely fast to check for changes at the
moment the menu will be displayed. For instance, in FastScripts
(which includes a replacement for the script menu), the entire script
folder hierarchy is queried for modifications (and the entire menu
dynamically rebuilt) in the instance between the user clicking and
the menu appearing. For users with slow macs or very large script
folders, I offer an option to disable this automatic syncing.
It's on my list to incorporate kqueue support for even better
performance, but the point is that for most purposes (a few hundred
items or less) it's going to be instantaneous to recursively check
the mod dates of the entire tree. And when you always check just
before displaying the menu, you never have to worry about the user
getting an "out of date" representation of their files.
Daniel
On Feb 14, 2006, at 3:29 PM, j o a r wrote:
You have got to be kidding?! You can't run out and check the file
system for changes 10 times per second! Use file system
notifications (kqueues or other) to make sure you only update your
menus when there are changes. At the very least, avoid updating the
menu unless there have actually been changes in the file system
when you poll - ie. keep an internal list and compare with what you
found when you polled.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden