Re: [Tracker] throttling (on battery)



Michael Biebl wrote:
Heya,

Hi,

first of all, congrats to the release. You guys have been doing a
tremendous job.
Packages for Debian will follow shortly.

:)

Now onto the topic:
IIRC correctly, martyn said that internally throttle level 5 and 0 are
identical.
The default setup uses a throttle level of 0 and switches to 5 on battery.
If the above is correct, this obviously doesn't make a lot of sense ;-)

No this is not correct.

Throttle values in the config are from 0->20. Any more than 20 makes no sense, the indexer effectively spends most of its time in g_usleep() otherwise. Note, this value is a *base value* which is used with the multiplier given when calling tracker_throttle(). From the indexer-split branch onwards, I made the base value *at least* 5 (in code). That means, the base value is a minimum of 5 (with a throttle config of 0). So when we detect we are on battery *and* the throttle is the default (which is 0), we bump this to 5. That means that when we call the throttle function and we are on battery and the throttle cpnfig is 0 (default), the base value is 10. This is then multiplied by the value given to tracker_throttle() and that is the time used for g_usleep().

So since the indexer-split, we are actually throttling for longer than we did previously, so we should be indexing things more slowly than we did before we started working on that branch. The reason it was done, was because people were still complaining about using too much CPU at the time.

I also noticed, that the slider in tracker-preferences ranges from 0 to 99,
whereas tracker.cfg says, it is 0 to 20.

Yes, I think 0-20 is the right value to use here. Nice catch. The UI needs to be fixed here.

I think this is something to look into (for 0.6.91).

Thanks for noticing :)

--
Regards,
Martyn



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]