GNOME Bugzilla – Bug 630810
Move the attributes and methods to the DynamicModule
Last modified: 2012-09-30 10:56:16 UTC
This patch is a proposition to improve speed of execution by reducing the number of calls to __getattr__. Profiling data and further explanation have been posted on the mailing list.
Created attachment 171254 [details] [review] Move the attributes and methods to the DynamicModule This patch put looked over methods and attributes in the dictionnary of DynamicModule instead of the one of its introspection_module attribute to save calls to __getattr__. This improves speed execution.
Comment on attachment 171254 [details] [review] Move the attributes and methods to the DynamicModule Looks good to me
Comment on attachment 171254 [details] [review] Move the attributes and methods to the DynamicModule Actually tests don't pass. Overrides might not be accounted for here
. . .
+ Trace 224141
Gtk.TreeViewColumn.__init__(self, title=title)
====================================================================== ERROR: test_uimanager (test_overrides.TestGtk) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/johnp/devel/gnome-shell/source/pygobject/tests/test_overrides.py", line 69, in test_uimanager """ File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 200, in add_ui_from_string return Gtk.UIManager.add_ui_from_string(self, buffer, length) TypeError: add_ui_from_string() takes exactly 2 arguments (3 given) ---------------------------------------------------------------------- Ran 439 tests in 1.299s FAILED (errors=12) Looks like Gtk.TreeViewColumn.__init__(self, title=title) gets redefined to call Gtk.overrides.TreeViewColumn.__init__. I'm guessing we are caching the override as the actual underlying call. This needs to be fixed in a way that is not specific to overrides.
Marking patch as obsolete to get it off the patch review queue.
Is this still relevant? If so, can you please re-do the performance testing (or tell us how you did them), so that we can evaluate them against the current pygobject? Also, the patch seems to cause regressions, see comment 4. Thank you!
Review of attachment 171254 [details] [review]: So I guess the patch is rejected then. Please revert if this is not the case.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!