Re: [Numpy-discussion] slow import of numpy modules

2008-07-03 Thread Fernando Perez
Hardy, Core 2 Duo laptop, picking a typical score, warm disk caches. Before: maqroll[research]> time python -c 'import numpy' 0.180u 0.032s 0:00.20 105.0%0+0k 0+0io 0pf+0w After: maqroll[research]> time python -c 'import numpy' 0.100u 0.032s 0:00.12 108.3%0+0k 0+0io 0pf+0w Definitely a w

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread David Cournapeau
On Thu, 2008-07-03 at 01:25 -0500, Robert Kern wrote: > > Before: > $ time python -c "import numpy" > python -c "import numpy" 0.30s user 0.82s system 91% cpu 1.232 total > > Removal of finfo: > $ time python -c "import numpy" > python -c "import numpy" 0.27s user 0.82s system 94% cpu 1.156 to

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread Robert Kern
On Wed, Jul 2, 2008 at 23:56, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Wed, 2008-07-02 at 23:36 -0500, Robert Kern wrote: >> >> Neither one has participated in this thread. At least, no such email >> has made it to my inbox. > > This was in the thread "import numpy" is slow, I mixed the two

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread David Cournapeau
On Thu, 2008-07-03 at 13:56 +0900, David Cournapeau wrote: > > Ok, will do it, then. I put the patches in ticket 838. I tried to commit the changes directly, but it looks like they disabled some proxy settings necessary to commit to svn at my company. On my computer, the changes cut 1/3 of total

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread David Cournapeau
On Wed, 2008-07-02 at 23:36 -0500, Robert Kern wrote: > > Neither one has participated in this thread. At least, no such email > has made it to my inbox. This was in the thread "import numpy" is slow, I mixed the two, sorry. > > I think it's worth moving these imports into the functions, then.

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread Robert Kern
On Wed, Jul 2, 2008 at 23:14, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Wed, 2008-07-02 at 21:50 -0500, Robert Kern wrote: >> >> So ... what were you referring to? > > To a former email from Matthieu in this thread (or Stefan ?). Neither one has participated in this thread. At least, no suc

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread David Cournapeau
On Wed, 2008-07-02 at 21:50 -0500, Robert Kern wrote: > > So ... what were you referring to? To a former email from Matthieu in this thread (or Stefan ?). > > There is special purpose code, yes. We used to use it to load proxy > objects for scipy subpackages such that "import scipy" would have

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread Robert Kern
On Wed, Jul 2, 2008 at 21:38, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Wed, 2008-07-02 at 21:21 -0500, Robert Kern wrote: >> On Wed, Jul 2, 2008 at 20:23, David Cournapeau >> <[EMAIL PROTECTED]> wrote: >> >> > I think that import numpy.core being slower than import numpy is a bug >> > which

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread David Cournapeau
On Wed, 2008-07-02 at 21:21 -0500, Robert Kern wrote: > On Wed, Jul 2, 2008 at 20:23, David Cournapeau > <[EMAIL PROTECTED]> wrote: > > > I think that import numpy.core being slower than import numpy is a bug > > which can be solved without breaking anything, though. > > It does not appear to be

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread Robert Kern
On Wed, Jul 2, 2008 at 20:23, David Cournapeau <[EMAIL PROTECTED]> wrote: > I think that import numpy.core being slower than import numpy is a bug > which can be solved without breaking anything, though. It does not appear to be slower to me. -- Robert Kern "I have come to believe that the who

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread David Cournapeau
On Wed, 2008-07-02 at 17:00 -0700, Michael McNeil Forbes wrote: > > One could use an environmental variable such as > NUMPY_SUPPRESS_TOP_LEVEL_IMPORTS, that, if defined, suppresses the > importing of unneeded packages. This would only affect systems that > define this variable, thus not bre

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread Michael McNeil Forbes
On 2 Jul 2008, at 3:59 PM, Robert Kern wrote: > On Wed, Jul 2, 2008 at 17:43, Nathan Jensen > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I was wondering if there was any way to speed up the global import of >> numpy modules. For a simple import numpy, it takes ~250 ms. In >> comparison, importing

Re: [Numpy-discussion] slow import of numpy modules

2008-07-02 Thread Robert Kern
On Wed, Jul 2, 2008 at 17:43, Nathan Jensen <[EMAIL PROTECTED]> wrote: > Hi, > > I was wondering if there was any way to speed up the global import of > numpy modules. For a simple import numpy, it takes ~250 ms. In > comparison, importing Numeric is only taking 40 ms. It appears that > even if

[Numpy-discussion] slow import of numpy modules

2008-07-02 Thread Nathan Jensen
Hi, I was wondering if there was any way to speed up the global import of numpy modules. For a simple import numpy, it takes ~250 ms. In comparison, importing Numeric is only taking 40 ms. It appears that even if you only import a numpy submodule, it loads all the libraries, resulting in the pa