Bug 1392874
| Summary: | gnome-control-center backgrounds panel: usage is really CPU intensive | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Fabio Valentini <decathorpe> |
| Component: | control-center | Assignee: | Control Center Maintainer <control-center-maint> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 26 | CC: | alexl, control-center-maint, cosimo.cecchi, debarshir, fmuellner, john.j5live, mclasen, mkasik, ofourdan, rhughes, rstrode, sandmann, slatchurie, tiagomatos |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-05-04 15:06:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
We use a bog standard GtkIconView for this, so reassigning to gtk3. This sort of bug report is probably best reported upstream though. In fact, I __did__ report it upstream first (on 2016-05-01), but nobody seems to have noticed that (for over six months). I also included the link to the upstream bug in my report, as you can see. (In reply to Bastien Nocera from comment #1) > We use a bog standard GtkIconView for this, so reassigning to gtk3. This > sort of bug report is probably best reported upstream though. I have reported the bug upstream. The problem doesn't come from gtk : https://bugzilla.gnome.org/show_bug.cgi?id=782839 It seems the problem comes from the draw function that redo the thumbnail every time the button is refreshed. This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. While this has been fixed with gnome 3.26 / fedora 27, it still affects fedora 26. This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. (In reply to Bastien Nocera from comment #1) > We use a bog standard GtkIconView for this, so reassigning to gtk3. I believe that the problem was in the two big buttons on the main panel, and not the GtkIconView in the chooser dialog. Either way, this was fixed in Fedora 27. |
The G-C-C backgrounds panel, when the buttons for "Background" and "Lock Screen" gain or lose focus, as when moving the mouse around the window or the window losing / gaining focus, is oddly *very* CPU intensive, especially on wayland. Looking at the output of sysprof when using the background panel a bit, it seems the image thumbnails are recalculated _every time_ the window focus changes / the button focus changes (so, every time the button is redrawn). That does not seem very smart ... (this dip in performance is *very* noticeable on wayland, not so much on X.org). I think calculating all the image previews ONCE (and probably caching them on disk in .cache/gnome-control-center/) would seem to be a more efficient solution. This is part of the sysprof output after moving the mouse around the backgrounds panel (not clicking anything) or having the G-C-C window lose / gain focus (doing this for ~1 min creates more than 100000 samples: Note the amount of calls to libjpeg / libpng necessary to re-size the images each time the button loses focus / is re-drawn. SELF CUMULATIVE FUNCTION [ 0.00%] [ 100.00%] [gnome-control-center] [ 27.07%] [ 27.13%] inflate_fast [ 25.05%] [ 25.11%] png_read_filter_row_paeth_multibyte_pixel [ 14.55%] [ 14.60%] scale_line [ 0.00%] [ 11.71%] In file [heap] [ 3.91%] [ 3.92%] decode_mcu [ 0.01%] [ 3.01%] sep_upsample [ 2.79%] [ 2.79%] adler32 [ 2.76%] [ 2.77%] inflate [ 1.75%] [ 1.75%] crc32 [ 0.91%] [ 0.91%] inflate_table [ 0.01%] [ 0.81%] In file /usr/lib64/libpthread-2.23.so [ 0.01%] [ 0.57%] In file /usr/lib64/libc-2.23.so [ 0.54%] [ 0.54%] png_read_filter_row_avg [ 0.50%] [ 0.50%] __memcpy_avx_unaligned [ 0.00%] [ 0.29%] gtk_css_value_image_compute [ 0.20%] [ 0.20%] gdk_cairo_surface_paint_pixbuf [ 0.18%] [ 0.18%] __GI_memcpy [ 0.14%] [ 0.14%] _gdk_pixbuf_get_module [ 0.13%] [ 0.13%] pixops_process [ 0.11%] [ 0.11%] png_read_filter_row_up [ 0.11%] [ 0.11%] gdk_pixbuf_fill [ 0.10%] [ 0.10%] process_pixel This bug has originally been reported upstream in GNOME Bugzilla, but has received no attention there for more than half a year (one full release cycle), and the bug still exists in fedora 24 and what will be fedora 25 (where wayland will be the default and this inefficiency very noticeable).