After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762724 - Use cpu when open even when doing nothing
Use cpu when open even when doing nothing
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: Backend
3.18.x
Other Linux
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-26 12:44 UTC by Sebastien Bacher
Modified: 2017-04-17 18:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
year-view: save context before retrieving font description (1.24 KB, patch)
2016-03-08 16:37 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Sebastien Bacher 2016-02-26 12:44:00 UTC
Using 3.18.2 on Ubuntu under Unity, when calendar is open it uses 50% cpu even when not doing anything with it
Comment 1 Christian Stadelmann 2016-02-28 23:09:27 UTC
Same behavior here: gnome-calendar often goes to 100% CPU load on one core. Especially happens when leaving gnome-calendar open for a long time (some hours).

After ~8 hours of having my gnome-session running, gnome-calendar has about 3 hours of CPU time, which is more than Xorg and gnome-shell added together. And gnome-calendar didn't do much, it just had to handle ca. 10 mouse clicks including 2 events added plus some text (event description) input.
Comment 2 Sebastien Bacher 2016-03-07 12:01:50 UTC
seems that gcal-year-view.c has its canvas which keeps redrawing/calling draw_navigator(). The draw_month_grid() function does a call to gtk_style_context_get() which seems to trigger a draw callback (from the callback doing the drawing...). Using gtk_style_context_save/restore around the context_get() seems to fix the issue, unsure if that's the right solution though?
Comment 3 Georges Basile Stavracas Neto 2016-03-08 16:37:36 UTC
Created attachment 323415 [details] [review]
year-view: save context before retrieving font description

Backported from master.
Comment 4 Georges Basile Stavracas Neto 2016-03-08 16:39:30 UTC
Thanks Sebastien for figuring this out. Pushed to gnome-3-18 stable branch.

Attachment 323415 [details] pushed as ee9bb96 - year-view: save context before retrieving font description