D7742: KDevelop projects: optional use of KDirWatch and defer it and parser start to after project loading

René J.V. Bertin noreply at phabricator.kde.org
Mon Sep 18 21:26:41 UTC 2017


rjvbb added a comment.


  >   Doesn't mac have directory watches which watch the whole subtree?
  
  My plan had been to have a look at KDirWatch after getting this into a more or less acceptable form (and upgrading a bunch of other packages including the frameworks).
  
  Mac has FSEvents, I have no experience with the API. I see Qt's QFileSystemWatcher uses it, but that doesn't mean KDirWatch does (by default) nor that it's an efficient API or implementation.
  
  For comparison, on Mac (2.7 Ghz i7, fs=HFS+):
  
    > time kf5-kcoreaddons/work/build/autotests/kdirwatch_qfswatch_unittest.app/Contents/MacOS/kdirwatch_qfswatch_unittest
    ********* Start testing of KDirWatch_UnitTest *********
    Config: Using QtTest library 5.8.0, Qt 5.8.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 6.0 (clang-600.0.57) (Apple))
    PASS   : KDirWatch_UnitTest::initTestCase()
    PASS   : KDirWatch_UnitTest::touchOneFile()
    QWARN  : KDirWatch_UnitTest::touch1000Files() Timeout waiting for KDirWatch. Got 1 dirty() signals, expected 100
    PASS   : KDirWatch_UnitTest::touch1000Files()
    PASS   : KDirWatch_UnitTest::watchAndModifyOneFile()
    PASS   : KDirWatch_UnitTest::removeAndReAdd()
    PASS   : KDirWatch_UnitTest::watchNonExistent()
    PASS   : KDirWatch_UnitTest::watchNonExistentWithSingleton()
    PASS   : KDirWatch_UnitTest::testDelete()
    QWARN  : KDirWatch_UnitTest::testDeleteAndRecreateFile() Timeout waiting for KDirWatch signal deleted(QString) ( "/var/folders/j1/1439ppj08xj8h6006s6drbq00000gs/T/kdirwatch_qfswatch_unittest-seruXE/subdir/1" )
    FAIL!  : KDirWatch_UnitTest::testDeleteAndRecreateFile() Failed to detect file deletion and recreation through either a deleted/created signal pair or through a dirty signal!
       Loc: [//path/to/kf5-kcoreaddons/work/kcoreaddons-5.35.0/autotests/kdirwatch_unittest.cpp(532)]
    QWARN  : KDirWatch_UnitTest::testDeleteAndRecreateDir() Timeout waiting for KDirWatch signal "deleted(QString)" ( "/var/folders/j1/1439ppj08xj8h6006s6drbq00000gs/T/olddir-B65x4e/" )
    FAIL!  : KDirWatch_UnitTest::testDeleteAndRecreateDir() 'waitForOneSignal(watch, SIGNAL(deleted(QString)), path1)' returned FALSE. ()
       Loc: [//path/to/kf5-kcoreaddons/work/kcoreaddons-5.35.0/autotests/kdirwatch_unittest.cpp(558)]
    PASS   : KDirWatch_UnitTest::testMoveTo()
    PASS   : KDirWatch_UnitTest::nestedEventLoop()
    PASS   : KDirWatch_UnitTest::testHardlinkChange()
    PASS   : KDirWatch_UnitTest::stopAndRestart()
    PASS   : KDirWatch_UnitTest::shouldIgnoreQrcPaths()
    PASS   : KDirWatch_UnitTest::cleanupTestCase()
    Totals: 14 passed, 2 failed, 0 skipped, 0 blacklisted, 21509ms
    ********* Finished testing of KDirWatch_UnitTest *********
    0.053 user_cpu 0.114 kernel_cpu 0:21.53 total_time 0.7%CPU {7843840M 0F 2340R 0I 13O 0k 0w 2086c}
  
  On my Linux rig (1.6Ghz N3150, fs=ZFS):
  
    > time kf5-kcoreaddons/work/build/autotests/kdirwatch_qfswatch_unittest
    ********* Start testing of KDirWatch_UnitTest *********
    Config: Using QtTest library 5.8.0, Qt 5.8.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 6.2.0 20160901)
    PASS   : KDirWatch_UnitTest::initTestCase()
    PASS   : KDirWatch_UnitTest::touchOneFile()
    PASS   : KDirWatch_UnitTest::touch1000Files()
    PASS   : KDirWatch_UnitTest::watchAndModifyOneFile()
    PASS   : KDirWatch_UnitTest::removeAndReAdd()
    PASS   : KDirWatch_UnitTest::watchNonExistent()
    PASS   : KDirWatch_UnitTest::watchNonExistentWithSingleton()
    PASS   : KDirWatch_UnitTest::testDelete()
    PASS   : KDirWatch_UnitTest::testDeleteAndRecreateFile()
    PASS   : KDirWatch_UnitTest::testDeleteAndRecreateDir()
    PASS   : KDirWatch_UnitTest::testMoveTo()
    PASS   : KDirWatch_UnitTest::nestedEventLoop()
    PASS   : KDirWatch_UnitTest::testHardlinkChange()
    PASS   : KDirWatch_UnitTest::stopAndRestart()
    PASS   : KDirWatch_UnitTest::shouldIgnoreQrcPaths()
    PASS   : KDirWatch_UnitTest::cleanupTestCase()
    Totals: 16 passed, 0 failed, 0 skipped, 0 blacklisted, 14903ms
    ********* Finished testing of KDirWatch_UnitTest *********
    0.257 user_cpu 0.212 kernel_cpu 0:14.92 total_time 3.0%CPU {7752M 0F 565R 61I 0O 1103w 275c}
  
  R.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D7742

To: rjvbb, #kdevelop, mwolff, brauch
Cc: mwolff, kossebau, arrowdodger, brauch, zhigalin, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170918/40a97aee/attachment-0001.html>


More information about the KDevelop-devel mailing list