#5452 HIGH 8.2.0 (: Beat XP in activity startup time.
Zarro Boogs per Child
bugtracker at laptop.org
Mon Jul 7 06:04:34 EDT 2008
#5452: Beat XP in activity startup time.
-------------------------+--------------------------------------------------
Reporter: cscott | Owner: cjb
Type: defect | Status: new
Priority: high | Milestone: 8.2.0 (was Update.2)
Component: distro | Version:
Resolution: | Keywords:
Next_action: never set | Verified: 0
Blockedby: | Blocking:
-------------------------+--------------------------------------------------
Comment(by mtd):
Replying to [comment:8 tomeu]:
> So I would be surprised if using lazy imports in this way would bring
any improvements, I would just expect a small amount of overhead.
I agree -- the code was just so others could see how the naive approach
really won't get much.
> If lazy imports are to be useful, it should be applied to all modules,
without having to change code. We should move the module initialization
from import time to first-use time.
autoimp would do this. We (in theory) would be able to replace all
imports with "import autoimp" and then things would be imported only as
necessary. Perhaps this would be useful at least just to establish an
upper-bound to the benefits of lazy importing, as security / stability
considerations might preclude its use in real life.
To be fair cscott mentioned Pippy, and not (or only by implication) all
sugar apps are slow by inherent sugar design.
> Perhaps we should patch python? I think that for python 3k there will be
hooks that will allow to do this kind of things without patching.
Maybe someone is interested in enabling this lazy-import behavior a crazy,
runtime-option for py3k? So we don't have to do it...
--
Ticket URL: <http://dev.laptop.org/ticket/5452#comment:10>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list