Why site-packages?

Dan Stromberg drsalists at gmail.com
Wed Jul 4 00:38:26 CEST 2012


On Tue, Jul 3, 2012 at 10:04 PM, Ian Kelly <ian.g.kelly at gmail.com> wrote:

>
> >> The site module has to process any .pth files in the site-packages,
> >> but apart from that, I think the actual amount of stuff in
> >> site-packages should be irrelevant.
> >
> > Irrelevant to what?   More stuff in site slowing things down?  Are .pth's
> > not correlated with more stuff in site-packages?  Aren't they actually a
> > thing In site?
>
> Yes, but I just don't expect the .pth files to grow that fast.  I've
> got something like 30 packages in my site-packages and only 6 .pth
> files, and most of those are one-liners.
>
It's not the Lines of Code, it's the track to track seeks.


> Right now this all seems highly speculative to me.  I think it might
> be informative, either to you or to me, to do an actual timing test.
> Why don't you try setting up two side-by-side installations of Python,
> one with all the site-packages cruft, and one trimmed down to only
> what you think should be in there, and see if you can measure a real
> difference in startup time?
>
In the original stackoverflow thread I mentioned, there's a speed
comparison.

It's possible they were seeing a cache effect, though it didn't really
sound like it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120703/a17fea5b/attachment.html>


More information about the Python-list mailing list