• 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
idle processing on main thread suggestions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

idle processing on main thread suggestions?


  • Subject: idle processing on main thread suggestions?
  • From: Ben Zotto <email@hidden>
  • Date: Mon, 18 Dec 2006 14:45:30 -0800 (PST)

Hi all,
I have an app that is targeting fast-response UI.  But I'm handling a large number of NSImages, many of which can have quite large resolutions.  What I'd like to do is somehow get methods called on my main thread that will refine the image quality, etc, but only after the app state has settled, and I'm not processing user events.

A way to think of this is: loading a document makes a bunch of custom drawing and stuff happen, but I can do the "low res" version of all this stuff up front for faster response with thumbnails, etc, and then when the app has "settled" I can quietly load in higher-res stuff and draw them in place.

A worker thread isn't really the answer I'm looking for, since queueing up all this work which might involve disk I/O in my worker thread pool slows down the main thread as well (or deadlocks it with some internal NSImage appkit lock).  A timer is not awesome since I can't predict when things will be idle.

Is there a way to queue some user event only when the event queue is empty?  I can divide the work up into small slices, I just want a smart way to meter the execution of the small slices.

Thanks for any thoughts or research hints.
Ben


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

  • Follow-Ups:
    • Re: idle processing on main thread suggestions?
      • From: Hsu <email@hidden>
  • Prev by Date: Re: Cocoa called from Carbon, objc_msgSend crash in 10.3.9.
  • Next by Date: Re: Cocoa called from Carbon, objc_msgSend crash in 10.3.9.
  • Previous by thread: Re: Cocoa called from Carbon, objc_msgSend crash in 10.3.9.
  • Next by thread: Re: idle processing on main thread suggestions?
  • Index(es):
    • Date
    • Thread