Version: 2.0.0 OS: All Detection changes of the dirfiles on NFS/mounted dirs. Reproducible: Didn't try http://lists.trolltech.com/qt-interest/2008-02/thread00553-0.html http://mail.kde.org/pipermail/kst/2010-August/018029.html
http://lists.trolltech.com/pipermail/qt-interest/2010-March/020526.html
'FAM' on Linux and 'FindFirstChangeNotification()/ReadDirectoryChangesW()' on Windows?
After handling more data .. On 08/17/2010 09:49 AM, Peter Milne wrote: > On 08/17/2010 12:21 AM, Peter Kümmel wrote: >>> We'll get by with pressing the "Reload" button so long, I'll try the >>> threaded timer hack some time. >> >> Is it a solution to simply trigger a "Reload" automatically by a timer, >> without touching any 'watcher' code? > > Yes. Simply pressing the button works OK, so a timer maybe would be > better. Other than every so often the refresh is bad, maybe because Kst > is reading data as it is being updated at the source. And there'd need > to be a timer-disable button to stop reloading in the cases where the > data is static. Actually, can I change that to a "No" here.. Currently running with a system where it has been acquiring for some minutes. So the low-rate data file is getting quite long (12000) points and growing. On my Linux desktop, running Kst 1.8, plotting the last 100 points on 32 channels, count-from-end 100 frames, the plot is nice and smooth, with at least one update per second. Compare with Kst 2.0, running on the same computer, reading the same network-mounted data source, press refresh, count to 6s. It feels really slow, and we can only expect it to get slower. Worse sometimes the plot comes up blank - probably some clash with the data producer process. > Doing a full Reload is of course forcing Kst to re-read all the data, > that could end up causing a lot of network traffic, whereas a > file-change-notify certainly only triggers on change, and, depending on > how the file read logic is structured, maybe only the new data has to be > read, rather than _all_ the data?. There's still the possibility of a > data fetch clashing with a data put, but that may be lower since the two > actions are now in sequence. The data source isn't particularly quick, it's a SAMBA export competing for time on a 400MHz embedded processor that also happens to be processing a 64MB/s data stream to memory - so brute force methods are not advised, it's clearly better to track the head of the files as Kst 1.8 does. Best regards Peter.
Under 1.x, we polled the files (in the case of dirfiles, we polled a reference vector through the getdata library). Polling the file has the advantage of ~always working, though its latency is limited by the polling rate, and it can use up (an irrelevant amount of) extra resources. We need to do this in kst2 as well, at least for remote files if there is a way to detect if the file is remote.
Seems win32 API is unreliable (for remote folders): MSVC docs: "Notifications may not be returned when calling FindFirstChangeNotification for a remote file system. And QFileSystemWatcher uses FindFirstChangeNotification." http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/4465cafb-f4ed-434f-89d8-c85ced6ffaa8/ http://stackoverflow.com/questions/151804/system-io-filesystemwatcher-to-monitor-a-network-server-folder-performance-cons http://stackoverflow.com/questions/57254/
On Kubuntu I get this output. registerWindow Invalid WindowMenu.Registrar! QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory QFileSystemWatcher: failed to add paths: /home/synth/.config/ibus/bus Bus::open: Can not get ibus-daemon's address. IBusInputContext::createInputContext: no connection to ibus-daemon
There is already a Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-8351
SVN commit 1169175 by kuemmel: Always poll on Linux with the help of QFileSystemWatcher for UpdateCheckType 'File', could be fixed when we know if the file is local or not. But maybe we remove the code because of all the Qt bugs, hacks and unimplemented Qt features. CCBUG:248104 M +2 -5 datasources/dirfilesource/dirfilesource.cpp M +24 -3 libkst/datasource.cpp M +3 -3 libkst/datasource.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1169175
SVN commit 1170062 by kuemmel: Add option to choose update type in data source wizard. CCBUG: 248104 M +5 -0 libkst/datasource.cpp M +2 -0 libkst/datasource.h M +41 -0 libkstapp/datawizard.cpp M +2 -0 libkstapp/datawizard.h M +53 -2 libkstapp/datawizardpagedatasource.ui WebSVN link: http://websvn.kde.org/?view=rev&revision=1170062
SVN commit 1170371 by kuemmel: Make changing update type also possible after using the wizard. BUG: 248104 M +4 -2 changedatasampledialog.cpp M +2 -1 datawizard.cpp M +37 -0 vectordialog.cpp M +2 -0 vectordialog.h M +144 -76 vectortab.ui WebSVN link: http://websvn.kde.org/?view=rev&revision=1170371
These bugs are solved with 2.0.0