[haiku-development] Re: file modification watching

  • From: Clemens <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 12 Aug 2011 11:50:35 +1200

On Fri, 12 Aug 2011 11:45:12 +1200, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:


Clemens wrote:
On Fri, 12 Aug 2011 04:12:51 +1200, Ingo Weinhold <ingo_weinhold@xxxxxx>
wrote:
>> Using a special flag would also need some more cycles so it might be the
>> easier option to always attach the missing information.
>
> It depends on the ratio of use, I guess. I suppose the overhead of the
> check would be insignificant compared to adding the additional fields,
> though.

You have to loop twice over the listener, first to send the base message
and the second time to send the message with the extended information.

Sending two messages in unnecessary overhead. I would just send the extended message to all listeners, if any listener requires it. The node monitoring service notify methods first collect the listeners and then construct the message to be sent, so in between the flags could be checked to decide whether or not to add the extra fields to the message.


ok, but in case of the index server this would be always the case because the index server watches all nodes and requires the entry_ref for each modified node...

Regards,
        Clemens

Other related posts: