gnome-shell/js
Daniel van Vugt 5610a2435d iconGrid: Defer and group animation cleanup
The `reactive` property of icon actors was being restored 24 times over
the course of the spring animation, all at slightly different times as
each icon finished animating at different times.

The problem is that toggling `reactive` on an `StWidget` incurs a style
change of the `insensitive` pseudo class, and style changes would quickly
queue relayouts incurring full stage reallocation. This occurred many times
during a spring animation hogging the CPU and limiting the frame rate.

The solution is defer and batch the cleanup for all icons until after the
last icon has finished animating. This way the CPU impact of the style
change and stage relayout isn't felt during the animation so the frame
rate remains higher and smoother. The overall CPU usage of the animation
is also reduced as the remaining relayouts are much more likely to be
grouped into a single frame.

Icon spring animation performance on an i7-7700:
Before: 83% CPU and 47 FPS
After : 78% CPU and 54 FPS
which is about a 22% increase in performance per clock (FPS/CPU).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/253


(cherry picked from commit a5e6dd52d2)
2018-11-20 19:52:16 +00:00
..
extensionPrefs cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
gdm gdm, util: Always allow to retry login in unlock mode 2018-07-25 20:38:58 +00:00
misc objectManager: correct other invalid index code in onNameVanished 2018-09-04 01:11:40 +02:00
perf cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
portalHelper cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
ui iconGrid: Defer and group animation cleanup 2018-11-20 19:52:16 +00:00
js-resources.gresource.xml thunderbolt: add policy provider and indicator 2018-02-05 21:38:49 +01:00
meson.build build: Support the meson build system 2017-07-20 00:20:54 +02:00