On Fri, Jun 15, 2012 at 9:29 PM, Oleg Sidorkin <span dir="ltr"><<a href="mailto:osidorkin@gmail.com" target="_blank">osidorkin@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Fri, Jun 15, 2012 at 3:57 PM, Alberto Villa <span dir="ltr"><<a href="mailto:avilla@freebsd.org" target="_blank">avilla@freebsd.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday 15 June 2012 12:48:48 Oleg Sidorkin wrote:<br>
> Original fix is a workaround of QT behavior on MacOS - as far as I<br>
> understand Linux is able to monitor files without opening them using<br>
> inotify. FreeBSD has no similar functions so QT has to open each file to<br>
> monitor it.<br>
<br>
Yes. inotify monitors file names, kqueue monitors file descriptors.<br>
<br>
Can you spot differences in file monitoring after you've applied your patch,<br>
anyway (maybe move some pictures away to let it start with the original code)?<br>
Due to differences in KDirWatch implementations, there is a chance that the<br>
final behaviour doesn't change (kqueue is able to detect modifications to<br>
files when monitoring a directory). In fact, it looks like code previous to<br>
the commit that triggered the bug was monitoring only directories, so the<br>
patch should have no effects apart from reduced efficiency.<br>
<br>
Anyway there is something I don't understand. I spent some time reading<br>
KDirWatch code, and FAM is used by default on FreeBSD. Now, FAM uses<br>
Gamin, and Gamin says:<br>
<br>
Gamin will only provide realtime notification of changes for at most n files,<br>
where n is the minimum value between (kern.maxfiles * 0.7) and<br>
(kern.maxfilesperproc - 200). Beyond that limit, files will be polled.<br>
<br>
Why is digiKam failing and not just polling transparently? Is it (or most<br>
likely KDE-Libs) using QFileSystemWatcher instead (which uses plain kqueue<br>
without falling back to polling, if I remember correctly)?<br>
<span><font color="#888888">--<br>
Alberto Villa, FreeBSD committer <avilla@FreeBSD.org><br>
<a href="http://people.FreeBSD.org/%7Eavilla" target="_blank">http://people.FreeBSD.org/~avilla</a><br>
<br>
It is hard to predict, in particular about the future.<br>
                -- Robert Storm Petersen<br>
</font></span></blockquote></div><br></div></div>I'll test the monitor behavior this weekend.<br clear="all">Thanks<span class="HOEnZb"><font color="#888888"><br>-- <br>Oleg Sidorkin<div style="display:inline"></div>

<br>
</font></span></blockquote></div><br>With the patch digikam notices directories creation and removing instantly but doesn't notices any files manipulations.<br clear="all"><br>-- <br>Oleg Sidorkin<div style="display:inline">

</div><br>