indicator-datetime-service is opening /etc/localtime every 5 seconds even on a totally "idle" system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Indicator Date and Time |
Fix Released
|
Medium
|
Charles Kerr | ||
indicator-datetime (Ubuntu) |
Fix Released
|
Medium
|
Charles Kerr | ||
Saucy |
Fix Released
|
Medium
|
Charles Kerr |
Bug Description
In an attempt to reduce unnecessary frequent periodic file access to save power, I noticed that indicator-
This seems a little excessive, especially because the TZ data doesn't change quite that frequently. It would be useful if this excessive polling on the file could be reduced if possible.
[Impact]
* Battery drain, wasting energy by a lot of unnecessary polling
[Test Case]
* Observe how often /etc/localtime or /etc/writable/
[Regression Potential]
* Possibility to not get the local time reliably
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Ted Gould (community): Approve
-
Diff: 70 lines (+29/-2)1 file modifiedsrc/service.c (+29/-2)
tags: | added: mobile-power-consumption |
Changed in indicator-datetime (Ubuntu): | |
assignee: | nobody → Charles Kerr (charlesk) |
importance: | Undecided → Medium |
status: | New → In Progress |
description: | updated |
Changed in indicator-datetime: | |
status: | New → Fix Committed |
assignee: | nobody → Charles Kerr (charlesk) |
importance: | Undecided → Medium |
Looks like this is the culprit:
#0 close () at ../sysdeps/ unix/syscall- template. S:81 filename@ entry=0x809dca0 "/etc/localtime", writable@ entry=0, error=error@ entry=0x0) buildd/ glib2.0- 2.38.0/ ./glib/ gmappedfile. c:271 <optimised out>) buildd/ glib2.0- 2.38.0/ ./glib/ gtimezone. c:432 buildd/ glib2.0- 2.38.0/ ./glib/ gtimezone. c:1411 zone_new_ local () at /build/ buildd/ glib2.0- 2.38.0/ ./glib/ gtimezone. c:1508 time_new_ now_local () at /build/ buildd/ glib2.0- 2.38.0/ ./glib/ gdatetime. c:731
#1 0xb7bd3545 in g_mapped_file_new (filename=
writable=
at /build/
#2 0xb7bfa972 in zone_info_unix (identifier=
at /build/
#3 g_time_zone_new (identifier=0x0) at /build/
#4 0xb7bfb595 in g_time_
#5 0xb7bb9de6 in g_date_