Bug 283605 - Add a config option to disable stopping indexing when on battery
Summary: Add a config option to disable stopping indexing when on battery
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-08 15:24 UTC by Shantanu Tushar
Modified: 2011-10-12 13:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shantanu Tushar 2011-10-08 15:24:24 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Currently, to save power, Nepomuk disables strigi when on battery. However in some use cases (Plasma Active in my case) its needed to disable this feature.
Please add a config option for disabling this, or else Plasma Active will be handicapped when on battery and files are added.

Reproducible: Always

Steps to Reproduce:
N/A

Actual Results:  
N/A

Expected Results:  
N/A
Comment 1 Shantanu Tushar 2011-10-08 16:45:02 UTC
To be more specific, one way to achieve this is to do this - just before disabling strigi, read a config entry from share/config/nepomukstrigirc and dont do it if a certain value is present.
Comment 2 Sebastian Kügler 2011-10-12 09:07:38 UTC
I think that's the intended behaviour already...?
Comment 3 Sebastian Trueg 2011-10-12 09:25:06 UTC
This makes sense. The question is: where should we put the config option in the GUI? Should it be in the power management configuration as part of the profile? Or should it be in the Nepomuk KCM? The latter seems a bit forced to me.
Comment 4 Shantanu Tushar 2011-10-12 09:29:41 UTC
As users wont really use that option (it only and almost always makes sense on tablets) I will suggest it as a non GUI option, that devs/packagers can use my putting inside global settings or something like that. And as its Nepomuk which does the disabling-indexing work, it should goto a nepomuk settings file.
Comment 5 Dario Freddi 2011-10-12 09:37:37 UTC
I agree with Shantanu, I would not add an option for that. Depending on how Strigi is efficient and how much power it wastes (would be nice to have some data about this) we might even go as far as disabling this "sleep" feature in certain/all environments, or try to come up with better heuristics to define when/how to save power when on battery.
Comment 6 Sebastian Kügler 2011-10-12 10:12:13 UTC
Hidden config in nepomukserverrc is just fine, IMO.
Comment 7 Dario Freddi 2011-10-12 10:29:44 UTC
+1, but I would still be interested in how nepomuk affects power consumption in the average situation and if we can do something to improve that - I think it's quite a priority for Active as well.
Comment 8 Shantanu Tushar 2011-10-12 11:00:00 UTC
+1 to config option in nepomukserverrc
Comment 9 Sebastian Trueg 2011-10-12 12:44:29 UTC
Git commit daa5819b83823aa787205008f7d4b07132e6019d by Sebastian Trueg.
Committed on 12/10/2011 at 14:42.
Pushed by trueg into branch 'master'.

Added new hidden config option to disable suspend on powersave.

This is very useful on mobile devices basically always run on battery
and required for Plasma Active.
Packagers can just install a global "nepomukstrigirc" config file and
set "disable suspend on powersave" to "true".

BUG: 283605

M  +1    -0    services/fileindexer/eventmonitor.cpp
M  +5    -0    services/fileindexer/fileindexerconfig.cpp
M  +10   -0    services/fileindexer/fileindexerconfig.h

http://commits.kde.org/nepomuk-core/daa5819b83823aa787205008f7d4b07132e6019d
Comment 10 Sebastian Trueg 2011-10-12 12:47:25 UTC
Git commit b12cda123b9adafe5e4fbcf655fdeff846f942d9 by Sebastian Trueg.
Committed on 12/10/2011 at 14:47.
Pushed by trueg into branch 'KDE/4.7'.

Added new hidden config option to disable suspend on powersave.

This is very useful on mobile devices basically always run on battery
and required for Plasma Active.
Packagers can just install a global "nepomukstrigirc" config file and
set "disable suspend on powersave" to "true".

BUG: 283605
FIXED-IN: 4.7.3

M  +1    -0    nepomuk/services/strigi/eventmonitor.cpp
M  +5    -0    nepomuk/services/strigi/strigiserviceconfig.cpp
M  +10   -0    nepomuk/services/strigi/strigiserviceconfig.h

http://commits.kde.org/kde-runtime/b12cda123b9adafe5e4fbcf655fdeff846f942d9
Comment 11 Sebastian Trueg 2011-10-12 12:47:35 UTC
Git commit 3f274318965fe6f71cfecd7d557b06a0d08e88e3 by Sebastian Trueg.
Committed on 12/10/2011 at 14:44.
Pushed by trueg into branch 'master'.

Added new hidden config option to disable suspend on powersave.

This is very useful on mobile devices basically always run on battery
and required for Plasma Active.
Packagers can just install a global "nepomukstrigirc" config file and
set "disable suspend on powersave" to "true".

BUG: 283605
FIXED-IN: 4.7.3

M  +1    -0    nepomuk/services/fileindexer/eventmonitor.cpp
M  +5    -0    nepomuk/services/fileindexer/fileindexerconfig.cpp
M  +10   -0    nepomuk/services/fileindexer/fileindexerconfig.h

http://commits.kde.org/kde-runtime/3f274318965fe6f71cfecd7d557b06a0d08e88e3
Comment 12 Sebastian Kügler 2011-10-12 12:57:16 UTC
That was quick :)

It took me a few times reading it, however, since there's a double negation:

Maybe renaming this option to 

indexOnPowerSave=

would prevent that? (Disable suspending == on, of course, but it's not that straight forward).

I've added the config file already to plasma-mobile/config/, but of course it's easy to change.
Comment 13 Sebastian Trueg 2011-10-12 13:02:53 UTC
(In reply to comment #7)
> +1, but I would still be interested in how nepomuk affects power consumption in
> the average situation and if we can do something to improve that - I think it's
> quite a priority for Active as well.

I suppose the only problematic situation is the initial indexing on first
startup. In case of a new device this is a non-issue since there are no files.
But still, it would be interesting to do some tests in full indexing mode.
Comment 14 Sebastian Trueg 2011-10-12 13:04:20 UTC
(In reply to comment #12)
> That was quick :)
> 
> It took me a few times reading it, however, since there's a double negation:
> 
> Maybe renaming this option to 
> 
> indexOnPowerSave=
> 
> would prevent that? (Disable suspending == on, of course, but it's not that
> straight forward).
> 
> I've added the config file already to plasma-mobile/config/, but of course it's
> easy to change.

Right, we could change it. I chose the "disable something" approach since the default is to not index. I thought that would be cleaner. But in the end I don't mind.
Comment 15 Sebastian Kügler 2011-10-12 13:09:36 UTC
It's not a given that a new user does not have any files in her homedirectory. Quite likely even, we'll have some default content in Plasma Active.