Comment #12 on issue 3427 by hacm...@gmail.com: sympy imports matplotlib on start-up
http://code.google.com/p/sympy/issues/detail?id=3427

In order to get an objective test, it is probably a good idea to look at the import time after clearing the disk cache. Under Linux, this can be done (as root) by running the following:

# sync && echo 3 > /proc/sys/vm/drop_caches

Doing this shows that PR 2101 does not dramatically reduce import time. Also, it shows that matplotlib's import is about 20% of SymPy's import time*. A significant portion is probably the importing of all of SymPy's various modules. Try the following before and after importing sympy:

import sys; print sorted(sys.modules)

Obviously, the only reliable way to check this is by profiling, but a very simple test that imports numpy, matplotlib, Cython, mpl_toolkits and PIL only adds up to about 40% of SymPy's import time (after disk cache flush).

So, I'm not sure that the subject of this ticket is quite accurate. Overall import time may be a problem, but it is not clear that matplotlib is the sole culprit. That being said, the time to import the standard SymPy in Ubuntu 12.04 (0.7.1.rc1) is about half of that for the latest master (0.7.2-git)

* When I say that matplotlib's import time is is X% of sympy's import time, I am comparing the time of a script that only imports matplotlib with one that import sympy. Both are run directly after clearing the disk cache.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to