QFileSystemWatcher vs KDirWatch

Andreas Pakulat apaku at gmx.de
Sat Jun 2 10:57:43 UTC 2007


On 02.06.07 04:56:11, dukju ahn wrote:
> Is the problem in KDirWatch is too serious to be usable? Because,
> I found strange bug in QFileSysWatcher, especially for fileChanged().
> 
> In my simple test program, when I edit a file that is being monitored,
> fileChanged() signal is emitted multiples of times. When the size of
> file is small (up to few kilobytes) it is ok, but when filesize becomes
> larger(300kb), same signal is emitted 20~30 times.
> It caused application hanging because QTextStream should parse
> that big fie 20~30 times again and again

That doesn't sound good, but I can't reproduce this here, so until
otherwise found I think this is a system-specific problem.

Whats weird is that doing things like

echo foo >>test.txt doesn't trigger the signal...

> I sent qt mailing-list subscribe mail. But don't try to use filesyswatcher
> for a moment, unless we found what's more stable between
> KDirWatch or QFileSysWatcher..

As I tried to explain: KDirWatch uses questionable ways of getting
notified for changes. We just recently received a bugreport for
KDevelop3 from somebody who can't/want to switch away from fam. This
lets KDevelop hog the CPU  on his system. So unless somebody else can
reproduce the QFSWatcher problem, I don't think we shouldn't use it.

Andreas

-- 
You have a reputation for being thoroughly reliable and trustworthy.
A pity that it's totally undeserved.




More information about the KDevelop-devel mailing list