• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: why does this leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: why does this leak?
      • From: j o a r <email@hidden>
References: 
 >why does this leak? (From: Robert Dell <email@hidden>)
 >Re: why does this leak? (From: Charlton Wilbur <email@hidden>)
 >Re: why does this leak? (From: Robert Dell <email@hidden>)
 >Re: why does this leak? (From: j o a r <email@hidden>)

  • Prev by Date: Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
  • Next by Date: Re: Best way to customize Cocoa
  • Previous by thread: Re: why does this leak?
  • Next by thread: Re: why does this leak?
  • Index(es):
    • Date
    • Thread