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 609546 - meta_workspace_set_builtin_struts(): optimize out non-changes
meta_workspace_set_builtin_struts(): optimize out non-changes
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-10 14:56 UTC by Owen Taylor
Modified: 2010-02-10 19:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
meta_workspace_set_builtin_struts(): optimize out non-changes (1.73 KB, patch)
2010-02-10 14:56 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2010-02-10 14:56:44 UTC
A little uncertain about whether this is necessary; I don't have any
evidence that constantly invalidating the workareas actually shows
up on profiles. It does keep noise out of the debug log.

(gnome-shell isn't careful about setting the same builtin struts,
and it seems better to fix it here than to add a layer inside the
Javascript that has to remember the last struts it set.)
Comment 1 Owen Taylor 2010-02-10 14:56:47 UTC
Created attachment 153422 [details] [review]
meta_workspace_set_builtin_struts(): optimize out non-changes

meta_workspace_set_builtin_struts() is slightly expensive; it involves
discarding all our cached computed information about the layout of the
workspace. So catch calls to set_builtin_struts() that don't change
anything.
Comment 2 Colin Walters 2010-02-10 15:30:40 UTC
Review of attachment 153422 [details] [review]:

Looks fine to me.
Comment 3 Owen Taylor 2010-02-10 19:38:20 UTC
Attachment 153422 [details] pushed as 6ffe5f8 - meta_workspace_set_builtin_struts(): optimize out non-changes