Cacheing sys.path rather than building it each time?

Steve Holden sholden at bellatlantic.net
Sat Apr 8 07:52:39 EDT 2000


Hamish Lawson wrote:
> 
> Some overhead in Python's startup time is caused by building
> sys.path. Of course you could use the -S option, but then you
> don't get a proper sys.path! What about cacheing the constructed
> path and a command-line option to specify use of that rather
> than building it each time? Presumably you'd also need a tool to
> rebuild the path when necessary - perhaps it could be invoked
> automatically by the distribution tools whenever a new module
> gets installed.
> 
> Hamish Lawson
> 
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!

Probably not an awfully good idea, given that "installation" of a new
module often consists of just dropping a ".py" file into a library
directory.  Without an common"install" process the work of checking
whether the cahced path is up to date would be almost as much as that
of building the path from scratch as is now done.

Unless, that is, someone else knows different...

regards
 Steve
--
"Bulding information systems just because it's fun."
Steve Holden  sholden at bellatlantic.net  703 716 7275



More information about the Python-list mailing list