• 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: File System Event callback only gets one event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File System Event callback only gets one event


  • Subject: Re: File System Event callback only gets one event
  • From: Dominic Giampaolo <email@hidden>
  • Date: Tue, 25 Mar 2008 15:59:33 -0700

I have created a File System Events stream and start it running. What I find odd, particularly in light of the API design which is clearly designed to handle large volumes of events, is that I never get any big batches of events passed to my callback routine, even when I start with a stream that asks for hundreds of thousands of historical events.

Every time my callback function is called, the numEvents parameter is 1. It processes one event

That's just an artifact of how historical events are
dealt with.  With live events that happen while your
stream is running they will be batched.

When processing thousands of historical events, most of the CPU time is wasted in the run loop. According to Shark & sample, only 10% of the time is spent in my callback function. The other 90% is spent in the run loop. This makes me think that I could get up to an order of magnitude improvement in performance if the stream would just pass more than 1 event at a time to my callback.

There is already a bug filed to batch historical events.
It may happen for SnowLeopard.


--dominic

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >File System Event callback only gets one event (From: James Bucanek <email@hidden>)

  • Prev by Date: File System Event callback only gets one event
  • Next by Date: Re: FSEventsFlushAsync() returns 0?
  • Previous by thread: File System Event callback only gets one event
  • Next by thread: AFP functions 76 and 79
  • Index(es):
    • Date
    • Thread