After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729823 - Some performance improvements on slider controls
Some performance improvements on slider controls
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-05-08 17:20 UTC by Giovanni Campagna
Modified: 2014-06-26 17:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
workspace: avoid GObject overhead while computing the clone layout (3.66 KB, patch)
2014-05-08 17:20 UTC, Giovanni Campagna
committed Details | Review
WorkspacesView: separate setting the full and the actual geometry (2.39 KB, patch)
2014-05-08 17:20 UTC, Giovanni Campagna
committed Details | Review
Workspace: ignore actual geometry changes while unmapped (2.41 KB, patch)
2014-05-08 17:20 UTC, Giovanni Campagna
committed Details | Review
WorkspacesView: don't access the allocation 4 times (1.16 KB, patch)
2014-05-08 17:21 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2014-05-08 17:20:38 UTC
No numbers, and a lot of doubts they matter in practice - the one
that should do something (the unmapped workspace one) doesn't change
anything because the moment you have windows outside the current workspace,
you also have the slider fully out always.
But heh.
Comment 1 Giovanni Campagna 2014-05-08 17:20:43 UTC
Created attachment 276180 [details] [review]
workspace: avoid GObject overhead while computing the clone layout

We already have the width and height information cached in JS,
let's avoid going through gjs-gobject-clutter to retrieve them
again. As a plus, with normal properties the optimizer should
be able to generate better code.
Comment 2 Giovanni Campagna 2014-05-08 17:20:49 UTC
Created attachment 276181 [details] [review]
WorkspacesView: separate setting the full and the actual geometry

They are different properties, they deserve different syncs.
Especially because a full allocation cycle sets both anyway, so
we should save some cycles this way.
Comment 3 Giovanni Campagna 2014-05-08 17:20:55 UTC
Created attachment 276182 [details] [review]
Workspace: ignore actual geometry changes while unmapped

If unmapped, ignore geometry changes. This avoids doing useless
layout work on invisible workspaces during the slider control
animations.
Comment 4 Giovanni Campagna 2014-05-08 17:21:01 UTC
Created attachment 276183 [details] [review]
WorkspacesView: don't access the allocation 4 times

Access it once, and save 3 GObject property accesses and related
copies.
Comment 5 drago01 2014-05-09 19:58:15 UTC
Review of attachment 276180 [details] [review]:

OK not sure this makes a measurable difference but its not like it makes the code way more compex or something.
Comment 6 drago01 2014-05-09 19:58:51 UTC
Review of attachment 276181 [details] [review]:

Makes sense.
Comment 7 drago01 2014-05-09 19:59:57 UTC
Review of attachment 276182 [details] [review]:

OK.
Comment 8 drago01 2014-05-09 20:00:46 UTC
Review of attachment 276183 [details] [review]:

OK.
Comment 9 Giovanni Campagna 2014-06-26 17:20:06 UTC
Attachment 276180 [details] pushed as 0271835 - workspace: avoid GObject overhead while computing the clone layout
Attachment 276181 [details] pushed as 309d40a - WorkspacesView: separate setting the full and the actual geometry
Attachment 276182 [details] pushed as 7d7b924 - Workspace: ignore actual geometry changes while unmapped
Attachment 276183 [details] pushed as 37ef0e4 - WorkspacesView: don't access the allocation 4 times