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 682803 - Don’t notify on changes to hash/equal functions
Don’t notify on changes to hash/equal functions
Status: RESOLVED FIXED
Product: libgee
Classification: Platform
Component: general
0.8.x
Other All
: Normal normal
: 0.7
Assigned To: libgee-maint
libgee-maint
Depends on:
Blocks: 682809
 
 
Reported: 2012-08-27 13:31 UTC by Philip Withnall
Modified: 2012-08-27 15:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don’t notify on changes to hash/equal functions (4.66 KB, patch)
2012-08-27 13:35 UTC, Philip Withnall
none Details | Review

Description Philip Withnall 2012-08-27 13:31:44 UTC
The hash/equal functions in various implementations of Set and Map have private setters, and are only set at construction time. Emitting GObject ‘notify’ signals for them is pointless and a waste of CPU time.

(Rationale: libfolks is creating thousands of Sets/Maps, and the g_object_notify() calls from constructing them were appearing quite high up in callgrind traces.)

Patch coming.
Comment 1 Philip Withnall 2012-08-27 13:35:06 UTC
Created attachment 222553 [details] [review]
Don’t notify on changes to hash/equal functions

Patch to add “[CCode (notify = false)]” annotations to the various properties. This is based on the 0.6 branch (since that’s what folks is still running against), but I can rebase it on master if desired.
Comment 2 Maciej (Matthew) Piechotka 2012-08-27 15:10:27 UTC
Fixed in master (the libgee 0.8 rc will be released today with this change).

commit d8ab9380b6ecb1af215d250f2f38d9b1dff4c6ab
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Mon Aug 27 08:07:18 2012 -0700

    Don’t notify on changes to hash/equal functions