Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24837 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2012-07-03 16:04 -0600 |
| Last post | 2012-07-03 16:04 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Why site-packages? Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-03 16:04 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2012-07-03 16:04 -0600 |
| Subject | Re: Why site-packages? |
| Message-ID | <mailman.1764.1341353116.4697.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web