• 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: Notification of file system modification arrives too early?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification of file system modification arrives too early?


  • Subject: Re: Notification of file system modification arrives too early?
  • From: Antonio Nunes <email@hidden>
  • Date: Fri, 28 May 2010 11:41:32 +0100

On 28 May 2010, at 11:30, Uli Kusterer wrote:

> The heuristic most people use is to wait a little time (a few seconds is usually enough) and only start processing a file if a new write notification hasn't arrived in the meantime. I usually use my UKPushbackMessenger for that purpose (see http://github.com/uliwitness/UliKit/blob/master/UKPushbackMessenger.h andhttp://github.com/uliwitness/UliKit/blob/master/UKPushbackMessenger.m).

Gruezi Uli,

I was hoping the system would provide something better for this. Looks like an enhancement request is in order.

Since PDF documents can potentially be huge, and I need to keep performance as good as possible, I need something more robust than waiting a few seconds. I am now experimenting with trying to read in a PDFDocument from the url, and not spawn the worker thread until this succeeds. Initial results look promising. The thread that sets up the task waits until it can successfully read in a PDFDocument from the URL, then releases the document and launches the task. I find this a bit of a hack, but if it works, it works, and I think this provides tighter performance than waiting for a set number of seconds (which may in extreme cases not to be long enough anyway).

Best,
António

-----------------------------------------------------------
Don't believe everything you think
-----------------------------------------------------------




_______________________________________________

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

  • Follow-Ups:
    • Re: Notification of file system modification arrives too early?
      • From: Antonio Nunes <email@hidden>
References: 
 >Notification of file system modification arrives too early? (From: Antonio Nunes <email@hidden>)
 >Re: Notification of file system modification arrives too early? (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Notification of file system modification arrives too early?
  • Next by Date: Re: Notification of file system modification arrives too early?
  • Previous by thread: Re: Notification of file system modification arrives too early?
  • Next by thread: Re: Notification of file system modification arrives too early?
  • Index(es):
    • Date
    • Thread