GNOME Bugzilla – Bug 762724
Use cpu when open even when doing nothing
Last modified: 2017-04-17 18:20:40 UTC
Using 3.18.2 on Ubuntu under Unity, when calendar is open it uses 50% cpu even when not doing anything with it
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.
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?
Created attachment 323415 [details] [review] year-view: save context before retrieving font description Backported from master.
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