On Thu, Jul 11, 2013 at 3:53 PM, Daniel Drake <d...@laptop.org> wrote:
> On Thu, Jul 11, 2013 at 12:40 PM, Simon Feltman <s.felt...@gmail.com> wrote:
>> All of this takes us back to __getattr__ being on the top of a profile
>> again. In which case we should ask why is it getting called at all? A simple
>> print statement shows without a doubt every access during module load is due
>> to that attr being overridden. This goes back to the question of using the
>> importing of Gtk as our performance measure as it will bias the optimization
>> effort to a module heavy with overrides. Do Sugar apps also import many
>> non-overridden modules?
>
> Sugar does import Gtk for all its apps, so naturally we are interested
> in making that import go as fast as it can. It is currently slow, and
> noticably slower than pygtk2. Thats why I picked it as a starting
> point.

I'm a bit surprised to hear that. PyGTK did a lot of things that
pygobject/introspection
doesn't have to do. Like creating thousands of methods.

I haven't followed pyobject introspection development very closely as of late,
but I can imaging that the overrides mechanism is something that could
potentially
slow down the import considerably. Eg, lazy class creation won't work with
overrides.

--
Johan Dahlin
_______________________________________________
python-hackers-list mailing list
python-hackers-list@gnome.org
https://mail.gnome.org/mailman/listinfo/python-hackers-list

Reply via email to