I'm a very happy ipython user on my desktop (135135 pystones/second).
I'm glad I can use ipython on an ebedded system, which has a CPU comparable to weakest android phone (902 pystones/second).
Python in general is rather sluggish on this system and ipython gets really slow, here's a comparison:
Is there a chance to lighten up ipython, disable some modules via config or in the ipython code? Is there perhaps an ipython-lite branch?
there is a --quick flag, but i think it only skip the config files.
you can try to make a profile that has a lot of --no-xxx options enabled and some others.
see ipython --help-all for the availlables flags.
Which version are you using? 0.13 had a bug where it tried to load a lot of libraries (numpy, paramiko, etc.) on startup. But that should only slow it down if you have those libraries installed.
0.12, not fancy libraries installed. I'll try to make a custom config, let's see if that helps any.
len([k for k in sys.modules.keys() if "ipy" in k.lower()])
gives me 259 on embedded 0.12 and 388 on desktop 0.13.
are there any modules I can delete without major breakage?
@Carreau tried the following:
time ipython2 --quick --no-pdb --no-term-title --nosep --no-deep-reload --no-automagic --no-autoindent --no-color-info --no-autoedit-syntax --no-confirm-exit --no-pprint --no-banner -c "import time" # vs
time ipython2 -c "import time"
The difference was negligible.
Let me know if this was not what you meant.
python loads 40 modules on startup, ipython 461 (ipython and its dependencies)
not all modules actually load, some are None.
there 100 ipy* modules that are real: https://gist.github.com/3314160
and here's full list: https://gist.github.com/3314139
100 real ipython modules
259 ipython modules including None's (that is 159 entries "IPxxxx": None in sys.modules)
461 total modules (that is 208 dependencies that are not IPyxxxxx)
None's may also be important if python has to search sys.path for these.
I don't think there's anything else we're immediately going to do on this, so I'm closing the issue. I did manage to eliminate unittest from the imports at startup. We'll try to keep an eye on it, but any improvements are likely to be incremental, not dramatic changes.