GNOME Bugzilla – Bug 631267
Only emit notify signal when value actually changed
Last modified: 2017-03-12 21:31:48 UTC
Property setters should only emit notify signals if the value actually changed. I'm working on bindings for GBinding, and the current behaviour will lead to infinite loops. Considering how slow emitting a signal in GObject is, this will probably help performance, too.
Created attachment 171655 [details] [review] codegen: Only emit notify signals if the value actually changed
Review of attachment 171655 [details] [review]: Thanks for the patch. I see two issues: * The current_method_inner_error check needs to be after acc.body.emit (you can just move it right above the call to add_function) * The inequality check will not work for string or structs (as this doesn't cause a regression, we could postpone the fix for that)
Created attachment 171987 [details] [review] codegen: Only emit notify signals if the value actually changed
Created attachment 172483 [details] [review] Rebased patch make test fails with the patch applied.
Created attachment 338029 [details] [review] codegen: Only emit notify signals if the value actually changed
Created attachment 338094 [details] [review] codegen: Only emit notify signals if the value actually changed
Comment on attachment 338094 [details] [review] codegen: Only emit notify signals if the value actually changed commit 64b9bfc1bc0abfed45ad07a8ebaef8a5f167f848 Author: Evan Nemerson <evan@coeus-group.com> Date: Thu Oct 7 01:07:30 2010 -0700 codegen: Only emit notify signals if the value actually changed