Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24837
| References | <CAGGBd_przF6HtPz5EQ=D8PssmQSda79n=ZwkZKoeQDaz4Dpg8w@mail.gmail.com> <CALwzidnvsU=zT0Vi2ckTNA6pwBbHLb-S34HcXpt1QDwX8rJGWQ@mail.gmail.com> <CAGGBd_rK+D8DE0FkGLSpVbbpZc-YommKKtX_ki2wJOacVVe3Zg@mail.gmail.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2012-07-03 16:04 -0600 |
| Subject | Re: Why site-packages? |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1764.1341353116.4697.python-list@python.org> (permalink) |
On Tue, Jul 3, 2012 at 3:34 PM, Dan Stromberg <drsalists@gmail.com> wrote: > If it was intended to be reusable code, I'd think it -should- go in > site-packages. > > But so much code in site-packages isn't intended to be reusable. Can you give some examples? Looking through my site-packages directory, everything in there is either used by multiple applications or at least has the potential to be. Frankly, if you've installed a third-party package and written your own code against it, even if only in one little script, isn't that already reuse? > And even for stuff that's reusable, there are advantages to just duplicating > them for the purposes of each application, because you never know when one > of them is going to need a different version from another. Definitely a situation for virtualenv, IMO. >> 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. 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?
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Why site-packages? Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-03 16:04 -0600
csiph-web