GNOME Bugzilla – Bug 687661
first access to applications menu blocks compositor thread
Last modified: 2021-07-05 14:20:16 UTC
+++ This bug was initially created as a clone of Bug #687362 +++ After entering the overview and waiting for that to happen (Bug #687364), start profiling/logging, then click the Applications icon at the bottom of the dock. The first time you do, I/O can be seen in the main thread. In one particular run, the main thread blocked for 44ms in a dispatch() that included stat() on each of several icon theme directories, and starting a thread to load view-grid-symbolic.svg; and then for 133ms in a dispatch() that included reading filter-selected-ltr.svg from the main thread. Repeating the same thing shortly afterwards resulted in several > 40ms dispatch() calls, and one 103ms, but less obvious I/O. (All figures are pessimistic, and include tracing overhead.)
Created attachment 228134 [details] strace: opening applications menu having already opened the overview
Created attachment 228135 [details] strace: opening applications menu again After Attachment #228134 [details] I closed the overview, reopened it, started profiling/logging, clicked on applications, and stopped profiling/logging, resulting in this trace.
Created attachment 228136 [details] sysprof for Attachment #228134 [details] Corresponds to Attachment #228134 [details]. Highlights include 2.99% in additional_selector_matches_style() and 1.74% in add_matched_properties().
Created attachment 228137 [details] sysprof for Attachment #228135 [details] Corresponds to Attachment #228135 [details]. Highlights include 3.67% in add_matched_properties().
With lighter-weight profiling (no sysprof, no strace, the GLib patch from Bug #588139) and the patches from Bug #687465 and Bug #688273, opening the applications view for the first time caused a 208ms dispatch. Closing the overview, reopening it, and clicking on the Show Applications icon again causes a ~70ms dispatch; repeatedly clicking the Show Applications icon while the overview is still open is no worse than ~35ms. Hopefully there's still room for improvement here.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.