KDirWatch emitting dirty signal many times for one change
Josef Weidendorfer
Josef.Weidendorfer at gmx.de
Wed Mar 24 17:20:33 GMT 2004
On Wednesday 24 March 2004 18:07, Matthias Kretz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I don't know if this could work, but in KDirWatchPrivate::famEventReceived
> there's a loop over all pending FAM events. Wouldn't it be possible to save
> the events into a list (or perhaps a map) and for every event check whether
> it already exists. Then all duplicates should be gone and you can start
> iterating over the list and emitting the signals.
> If this doesn't fix it perhaps the iteration over the list can be done
> after a short time so that more incoming FAM events can be checked for
> duplicates.
That doesn't fix the problem with change events occuring when you have added a
file watch again after saving the file: The latency of the event could be
quite long. The best is to start a rescan timer on FAM events similar to
DNOTIFY events.
Can you check out the attached patch?
Josef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdw.patch
Type: text/x-diff
Size: 6948 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040324/4cfd9dad/attachment.patch>
More information about the kde-core-devel
mailing list