File System Event callback only gets one event
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