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 630810 - Move the attributes and methods to the DynamicModule
Move the attributes and methods to the DynamicModule
Status: RESOLVED INCOMPLETE
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-28 11:09 UTC by Damien Caliste
Modified: 2012-09-30 10:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move the attributes and methods to the DynamicModule (1.62 KB, patch)
2010-09-28 11:09 UTC, Damien Caliste
rejected Details | Review

Description Damien Caliste 2010-09-28 11:09:52 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.
Comment 1 Damien Caliste 2010-09-28 11:09:54 UTC
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 2 johnp 2010-10-05 15:12:55 UTC
Comment on attachment 171254 [details] [review]
Move the attributes and methods to the DynamicModule

Looks good to me
Comment 3 johnp 2010-10-13 17:37:43 UTC
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
Comment 4 johnp 2010-10-13 17:42:47 UTC
.
.
.

  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
  • File "/home/johnp/devel/gnome-shell/source/pygobject/gi/overrides/Gtk.py", line 420 in __init__
    Gtk.TreeViewColumn.__init__(self, title=title)
RuntimeError: maximum recursion depth exceeded while calling a Python object

======================================================================
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.
Comment 5 Martin Pitt 2012-04-04 12:43:04 UTC
Marking patch as obsolete to get it off the patch review queue.
Comment 6 Martin Pitt 2012-04-20 13:03:52 UTC
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!
Comment 7 Tobias Mueller 2012-09-30 10:55:47 UTC
Review of attachment 171254 [details] [review]:

So I guess the patch is rejected then. Please revert if this is not the case.
Comment 8 Tobias Mueller 2012-09-30 10:56:16 UTC
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!