Bug 38837

Summary: Reduce power consumption: timers must end eventually
Product: LibreOffice Reporter: Björn Michaelsen <bjoern.michaelsen>
Component: LibreofficeAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: medium CC: caolanm, libreoffice, pkoroau
Version: unspecified   
Hardware: Other   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=73165
Whiteboard: EasyHack DifficultyBeginner SkillCpp target:4.1.0
i915 platform: i915 features:
Attachments: here's a patch to output "TICK" every time a timer timesout
better debugging patch

Description Björn Michaelsen 2011-06-30 09:25:26 UTC
Reduce power consumption: timers must end eventually

Background: We have a lot of timers, which constantly fire endlessly once started (calc has a particularly nasty one). So we chew up battery life on laptops when we're idling. When we're idle we should, after a short enough time, actually go idle and not wake up the laptop constantly. That means removing any leaked timers properly. This is a matter of tracking pending timers, and verifying that they are sensible, adding some infrastructure to help with this would be good too. See #i106485.

Skills: building, C++
Comment 1 Aldo Román Nureña 2012-04-12 18:39:30 UTC
I'm sorry if i'm a newbie here, but I dont get it about "timers" and what they do. Any trail?
Comment 2 Caolán McNamara 2012-04-13 05:48:01 UTC
Created attachment 59907 [details]
here's a patch to output "TICK" every time a timer timesout

The problem is basically for battery life on e.g. a laptop. Ideally if office is open on a laptop and you're not doing anything with it you don't want the office to be running constantly waking up your processor and eating battery life if it has no work to do.

This commit http://cgit.freedesktop.org/libreoffice/core/commit/?id=388486a510c8f5b04132a614fa5f2c330d229248 and this description https://issues.apache.org/ooo/show_bug.cgi?id=106487#c0 is a good example of what I mean, i.e. changed "always running a timer to layout equations" to "run the timer to layout equations only when the equation has changed"
Comment 3 Florian Reisinger 2012-05-18 09:49:30 UTC
Deleted "Easyhack" from summary.
Comment 4 Caolán McNamara 2012-12-05 15:31:17 UTC
Created attachment 71031 [details] [review]
better debugging patch
Comment 5 Not Assigned 2012-12-20 11:25:01 UTC
pkoroau pkoroau committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7a5272dc29c6efdaa99f97a627e6d9b695ae32f6

fdo#38837: Timers must end eventually [Writer idle timer]



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Björn Michaelsen 2013-10-04 18:46:12 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 7 Janit Anjaria 2013-12-22 18:29:09 UTC
Is there still some scope on this bug where i can work..??because it sounds like an interesting bug but it would be great if someone would help me with the same. :)
Comment 8 Björn Michaelsen 2015-01-02 22:35:19 UTC
The change:

https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=7a5272dc29c6efdaa99f97a627e6d9b695ae32f6;hp=4241ef2325d803914e9c29d8d6ec0e7c49f6996c

done for this issue caused regression fdo#73165. Might need a close look, if the change is worth the regression (or if the regression can be healed).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.