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 702913 - [PATCH] Reduce hash table lookups in gdk_x11_screen_supports_net_wm_hint()
[PATCH] Reduce hash table lookups in gdk_x11_screen_supports_net_wm_hint()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.8.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-06-23 19:11 UTC by John Lindgren
Modified: 2013-06-25 01:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Optimize gdk_x11_screen_supports_net_wm_hint() (848 bytes, patch)
2013-06-23 19:11 UTC, John Lindgren
none Details | Review

Description John Lindgren 2013-06-23 19:11:05 UTC
Created attachment 247573 [details] [review]
Optimize gdk_x11_screen_supports_net_wm_hint()

Please find attached a simple patch which moves the call to gdk_x11_atom_to_xatom_for_display() outside of the search loop in gdk_x11_screen_supports_net_wm_hint().  In my test case (running Audacious for about a minute), this reduced the total number of hash table lookups performed from 370,000 to 230,000.
Comment 1 John Lindgren 2013-06-25 01:21:31 UTC
Looks like this was committed in 6eea6ddcc3a8dc1ac18e83161de2acfa77a356e8.  Thanks!