Bug 303369

Summary: Index new files when on battery
Product: [Unmaintained] nepomuk Reporter: Vishesh Handa <me>
Component: fileindexerAssignee: Sebastian Trueg <trueg>
Status: RESOLVED FIXED    
Severity: task CC: me
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Vishesh Handa 2012-07-11 14:24:48 UTC
Currently the Nepomuk File Indexing service only indexes files when the machine is not running on battery. This makes sense because we do not want to consume too much cpu when on battery.

However, even when you're on battery you would still want modified files, and new files to get indexed right away. Additionally, devices like tablets are almost always run on battery, which makes the current behavior not suitable for tablets.

Relevant code: nepomuk-core/services/fileindexer/indexscheduler.cpp
Mailing List Entry: http://lists.kde.org/?l=nepomuk&m=133686014418085&w=2

We already have a list of UpdateDirFlags in the IndexScheduler, so it should be relatively easy to just filter based on whether it is forced indexing/normal routine indexing / new file / file changed indexing.

*Confusing Note*: The Index Scheduler also has some code related to indexing speed - ReducedSpeed and SnailPace. This indexing speed is controlled by the file indexer (fileindexer.cpp) based on the usage of the system. We currently use KIdleTime to determine if the system is being actively used.