[Numpy-discussion] "import numpy" is slow

Christopher Barker Chris.Barker@noaa....
Mon Aug 4 18:01:12 CDT 2008


OK,

So I'm an idiot. After reading this, I thought "I haven't rebooted for a 
while". It turns out it's been 35 days. I think I've been having slow 
startup for a longer than that, but none the less, I re-booted (which 
took a long time), and presto:

$ time python -c "import numpy"

real    0m0.686s
user    0m0.322s
sys     0m0.363s

much better!

I suspect OS-X did some disk-cleaning on re-boot.

Frankly, 35 days is pretty pathetic for an uptime, but as I said, I 
think this issue has been going on longer. Perhaps OS-X runs a disk 
check every n re-boots, like some linux distros do.

Sorry about the noise, and thanks, particularly to Robert, for taking an 
  interest in this.

-Chris



Robert Kern wrote:
> On Mon, Aug 4, 2008 at 14:24, Christopher Barker <Chris.Barker@noaa.gov> wrote:
>> Robert Kern wrote:
>>> It isn't. The problem is on Chris's file system.
>> Thanks for all your help, Robert. Interestingly, I haven't noticed any
>> problems anywhere else, but who knows?
>>
>> I guess this is what Linux Torvalds meant when he said that OS-X's file
>> system was "brain dead"
>>
>>> Whatever is wrong
>>> with his file system (Bill Spotz's identical problem suggests too many
>>> temporary but unused inodes)
>> I didn't see anything about Bill having similar issues -- was it on this
>> list?
> 
>>From my earlier message in this thread:
> 
> """
> Looking at the Shark results you sent me, it looks like all of your
> time is getting sucked up by the system call getdirentries(). Googling
> for some of the function names in that stack brings me to the message
> "Slow python initialization" on the Pythonmac-SIG:
> 
>  http://mail.python.org/pipermail/pythonmac-sig/2005-December/015542.html
> 
> The ultimate resolution was that Bill Spotz, the original poster, ran
> Disk Utility and used the Disk Repair option to clean up a large
> number of unused inodes. This solved the problem for him:
> 
>  http://mail.python.org/pipermail/pythonmac-sig/2005-December/015548.html
> """
> 

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov


More information about the Numpy-discussion mailing list