Comment #17 on issue 3427 by [email protected]: sympy imports matplotlib on
start-up
http://code.google.com/p/sympy/issues/detail?id=3427
Looks like numpy & matplotlib are the main culprits of import slowness
after all. On my machine, after clearing the disk cache, I get:
master$ time python -c 'import sympy'
real 0m5.936s
user 0m0.500s
sys 0m0.124s
Running it several times (clearing the disk cache each time), I get numbers
between 5.9 and 6.5s. In an experimental branch where all numpy &
matplotlib imports have been moved out of the module scope and into
functions/classes:
nonumpy$ time python -c 'import sympy'
real 0m2.721s
user 0m0.308s
sys 0m0.060s
Running it several times, I get numbers between 1.9 and 2.7s.
I also tried stopping Cython from importing by default, which does not give
nearly as big of a speed-up (if any).
Is preventing gmpy from importing along with sympy feasible? Is it worth
it? Doesn't so much of sympy use mpmath (and therefore gmpy) that it will
end up importing it for most things a user will want to do anyway? numpy
(and obviously matplotlib) are only used for plotting, really, so it is
clearly possible to not import them with the rest of sympy, since plotting
is fairly self-contained.
FYI, I also get a base python start-up time of between 0.3 an 1.0s.
$ time python -c ''
real 0m0.299s
user 0m0.008s
sys 0m0.016s
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.