Re: Slow loading, moving base code to C
- From: Daniel Drake <dsd laptop org>
- To: Simon Feltman <s feltman gmail com>
- Cc: "python-hackers-list gnome org" <python-hackers-list gnome org>
- Subject: Re: Slow loading, moving base code to C
- Date: Thu, 11 Jul 2013 12:53:53 -0600
On Thu, Jul 11, 2013 at 12:40 PM, Simon Feltman <s feltman 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.
When I got to __getattr__ I realised both that this code is running
slowly, and that it is a codepath hit by *all* pygobject use. At
import time, for overrides, for calls into the underlying libraries,
etc. If a measurable difference can be made out of optimizing that, I
would say it is worth it.
Thanks for all the bugzilla links - lots of work to do!
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]