Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File System Event callback only gets one event



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:
http://lists.apple.com/mailman/options/filesystem-dev/email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.