gnome-shell/js/ui
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
..
components automountManager: remove allowAutorun expire timeout on volume removal 2018-09-03 23:38:17 +00:00
status network: Don't assume the active connection has been processed first 2018-09-03 23:34:07 +00:00
accessDialog.js cleanup: Use method syntax 2018-02-21 13:54:58 +00:00
altTab.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
animation.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
appDisplay.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
appFavorites.js appFavorites: Add evolution to rename list 2018-04-10 14:38:26 +00:00
audioDeviceSelection.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
background.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
backgroundMenu.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
boxpointer.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
calendar.js calendar: chain up to parent on _onDestroy 2018-09-03 23:39:40 +00:00
checkBox.js cleanup: Use method syntax 2018-02-21 13:54:58 +00:00
closeDialog.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
ctrlAltTab.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
dash.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
dateMenu.js worldClock: Handle named timezones 2018-04-13 09:15:48 +00:00
dialog.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
dnd.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
edgeDragAction.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
endSessionDialog.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
environment.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
extensionDownloader.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
extensionSystem.js extensionSystem: Unset stylesheet file reference when unloaded 2018-09-03 23:36:00 +00:00
focusCaretTracker.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
grabHelper.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
ibusCandidatePopup.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
iconGrid.js iconGrid: Defer and group animation cleanup 2018-11-20 19:52:16 +00:00
inhibitShortcutsDialog.js cleanup: Use method syntax 2018-02-21 13:54:58 +00:00
kbdA11yDialog.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
keyboard.js keyboard: Handle case where keyboardMonitor is unset 2018-08-31 14:39:12 +00:00
layout.js layoutManager: Return null monitor if focusIndex is invalid 2018-08-31 14:40:35 +00:00
lightbox.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
lookingGlass.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
magnifier.js magnifier.js: Fix zoom juddering 2018-06-07 08:42:32 +00:00
magnifierDBus.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
main.js js/main: Throw error if no valid default stylesheet is found 2018-09-03 23:35:30 +00:00
messageList.js messageList: stop syncing if closeButton has been destroyed 2018-09-03 23:38:47 +00:00
messageTray.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
modalDialog.js modalDialog: Remove some unused code 2018-03-21 16:48:56 +00:00
mpris.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
notificationDaemon.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
osdMonitorLabeler.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
osdWindow.js osdWindow: Disconnect signals on destroy 2018-10-30 13:13:50 +01:00
overview.js overview: Use whole stage size for cover pane 2018-08-30 02:37:28 +00:00
overviewControls.js overviewControls: Sync hover after drag operations 2018-08-31 14:28:11 +00:00
padOsd.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
panel.js panel: Allow restoring maximized/tiled windows by touch 2018-07-31 00:17:49 +00:00
panelMenu.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
pointerWatcher.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
popupMenu.js popupMenu: Don't handle key presses directly if there are modifiers 2018-07-31 00:14:53 +00:00
remoteMenu.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
remoteSearch.js remoteSearch: Actually return icons 2018-05-08 22:02:11 +02:00
runDialog.js runDialog: Use ClutterText::activate for enter handling 2018-08-19 21:11:37 +00:00
screencast.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
screenShield.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
screenshot.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
scripting.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
search.js search: Ignore search provider results metas if search is cancelled 2018-09-04 01:12:24 +02:00
sessionMode.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
shellDBus.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
shellEntry.js shellEntry: Use correct enum for input purpose hints 2018-03-14 13:30:47 +00:00
shellMountOperation.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
slider.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
switcherPopup.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
switchMonitor.js cleanup: Use method syntax 2018-02-21 13:54:58 +00:00
tweener.js cleanup: Use arrow notation for anonymous functions 2018-02-21 13:55:00 +00:00
unlockDialog.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
userWidget.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
viewSelector.js viewSelector: Cancel search on overview hidden 2018-09-04 01:12:04 +02:00
windowAttentionHandler.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
windowManager.js windowManager: Don't animate unmanaged windows on (un)minimization 2018-08-31 14:40:01 +00:00
windowMenu.js windowMenu: Check if monitorIndex is valid before using it 2018-08-31 14:38:54 +00:00
workspace.js workspace: Avoid setting an undefined width 2018-09-04 17:30:56 +02:00
workspacesView.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
workspaceSwitcherPopup.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00
workspaceThumbnail.js workspace: Fix infinite loop when finding parent window of dialogs 2018-08-30 02:39:37 +00:00
xdndHandler.js cleanup: Use Function.prototype.bind() 2018-02-21 13:55:02 +00:00