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

File System Event callback only gets one event


  • Subject: File System Event callback only gets one event
  • From: James Bucanek <email@hidden>
  • Date: Tue, 25 Mar 2008 15:41:30 -0700

Hello again,

This is more idle curiosity more than anything, but I find the FSEvents callback behavior odd.

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 and returns. 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.

I'm also surprised at the number of duplicate consecutive events. I could also deal with these more efficiently if I could process the events in larger batches.
--
James Bucanek


_______________________________________________
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


  • Follow-Ups:
    • Re: File System Event callback only gets one event
      • From: Dominic Giampaolo <email@hidden>
  • Prev by Date: Re: FSEventsFlushAsync() returns 0?
  • Next by Date: Re: File System Event callback only gets one event
  • Previous by thread: Re: FSEventsFlushAsync() returns 0?
  • Next by thread: Re: File System Event callback only gets one event
  • Index(es):
    • Date
    • Thread