[IPython-user] Tweaking IPython for startup speed
Fernando Perez
Fernando.Perez at colorado.edu
Sun Oct 15 18:04:10 CDT 2006
[ Cc-ing the list, to which you need to subscribe to post ]
ipython-user-bounces at scipy.org wrote:
> The attached message has been automatically discarded.
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Tweaking IPython for startup speed
> From:
> Brian Beck <exogen at gmail.com>
> Date:
> Sun, 15 Oct 2006 18:41:49 -0400
> To:
> ipython-user at scipy.net
>
> To:
> ipython-user at scipy.net
>
>
> Hi,
>
> Often times I want to use IPython just to perform some quick interactive
> math or functions and I get really impatient while IPython is starting. It
> can take up to 5 seconds to give me the prompt in the machines I've tried
> it on (Python 2.4 and 2.5). Okay, that's not a long time but when you're
> whipping around in the console and typing like mad it's a considerable
> wait.
>
> The plain old Python interactive shell starts immediately for me. Are there
> features I can tweak through IPython that will give me the fastest startup
> possible? Does anyone know which features in particular are making it
> slower?
There isn't an easy fix for this. The ipython startup proces is fairly
lengthy and it loads a lot of stuff, precisely to give you all of its
convenience. The code is monolithic enough that it would not be easy to try
to chop it into little chunks.
I suggest that for quick once-off things, you just use the plain python shell,
and leave ipython for tasks where the initial startup will be negligible
compared to how long you'll be using it. It's one thing to wait 5 seconds if
you are going to use it for 2, and another if you will use it for one hour.
For the record, on my fairly old (3 years) desktop in the office, which gets
$HOME over NFS, ipython starts in about 3 seconds if I haven't touched the
system in a few days (so that everything has to be re-read over NFS) and in
under one second after that. I find that tolerable, though it's still
noticeably slower than the plain python shell.
If I'm starting with the full matplotlib support, that can take well over 15
seconds when the disk buffers are reloading, but it's not too bad after that.
Cheers,
f
More information about the IPython-user
mailing list