Version: unspecified (using KDE 4.5.2) OS: Linux When the strigi indexer is idle, it still continually polls every 20 seconds to check the available disk space. This is unnecessary when idle and simply generates unnecessary os wakeups. Ideally the timer would be turned off completely in the case that it is idle for any reason other than disk space. Also, this might work to reduce the number of stat() calls by about 4 each time it is called. Completely untested. --- eventmonitor.cpp.space 2010-04-28 02:01:04.000000000 -0600 +++ eventmonitor.cpp 2010-10-20 15:57:31.388194067 -0600 @@ -104,7 +104,8 @@ void Nepomuk::EventMonitor::slotCheckAvailableSpace() { - KDiskFreeSpaceInfo info = KDiskFreeSpaceInfo::freeSpaceInfo( KStandardDirs::locateLocal( "data", "nepomuk/repository/", false ) ); + static KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath( KStandardDirs::locateLocal( "data", "nepomuk/repository/", false ) ); + KDiskFreeSpaceInfo info = KDiskFreeSpaceInfo::freeSpaceInfo( mp->mountPoint() ); if ( info.isValid() ) { if ( info.available() <= StrigiServiceConfig::self()->minDiskSpace() ) { if ( m_indexScheduler->isRunning() && Reproducible: Always
Your patch does not make any difference since the exact code path is called using the exact same amount of stats. However, the suggestion to not check the free disk space makes A LOT of sense. Stay tuned for a commit.
SVN commit 1192034 by trueg: Suspend the available disk space polling while the indexer is idle. Restart it when the indexing continues. BUG: 254813 M +20 -1 eventmonitor.cpp M +1 -0 eventmonitor.h M +1 -0 indexscheduler.cpp M +2 -0 indexscheduler.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1192034