![Sundeep Mediratta](/assets/img/avatar_default.png)
When an extension is disabled, we "rebase" all extensions that were enabled afterwards, in case they override the same method. This can be fairly expensive, in particular when disabling many extensions at once, for instance when locking the screen. Help with that by sorting extensions by the number of session-modes, as extensions that support multiple modes are less likely to be disabled on session mode changes. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2851>