On Fri, Aug 25, 2017 at 11:47 AM, Erik Bray <[email protected]> wrote:
> On Fri, Aug 25, 2017 at 10:31 AM, Harald Schilly <[email protected]> wrote:
>> Inside sage -sh:
>>
>> (sage-sh) ...@compute8-us:build$ time echo "print()" | ipython  > /dev/null
>>
>> real    0m1.122s
>> user    0m0.812s
>> sys     0m0.080s
>> (sage-sh) ...@compute8-us:build$ time echo "print()" | python  > /dev/null
>>
>> real    0m0.014s
>> user    0m0.008s
>> sys     0m0.004s
>> (sage-sh) ...@compute8-us:build$ time echo "print()" | ipython  > /dev/null
>>
>> real    0m1.076s
>> user    0m0.796s
>> sys     0m0.064s
>>
>> (sage-sh) ...@compute8-us:build$ time echo "print()" | python  > /dev/null
>>
>> real    0m0.014s
>> user    0m0.008s
>> sys     0m0.004s
>
> Looking at these numbers it would seem (unsurprisingly) that IPython
> is the primary culprit.  IPython has always been a little noticeably
> slower to start up for me though.

I found this to also be a significant source of slowdown, every time
sage-env is sourced (even just when running something like `sage
-sh`):

423 # Use a matplotlib config directory specific to Sage and specific to
424 # the version number of matplotlib, by setting the environment
425 # variable MPLCONFIGDIR. Note that we can't find the version number by
426 # importing matplotlib, because that could create matplotlib's standard
427 # config directory. So we use pkg_resources.
428 "$SAGE_LOCAL/bin/python" -c 'import pkg_resources;
pkg_resources.get_distribution("matplotlib").version' 2>/dev/null
429 if [ $? -eq 0 ]; then
430     MPLVERSION=`"$SAGE_LOCAL/bin/python" -c 'import pkg_resources;
print (pkg_resources.get_distribution("matplotlib").version)'`
431     MPLCONFIGDIR="$DOT_SAGE/matplotlib-$MPLVERSION"
432     export MPLCONFIGDIR
433     # The directory is created when Sage starts (see sage.misc.misc).
434 fi

That's two extra Python interpreter calls every time almost any `sage`
command is run.  This can probably be avoided, somehow...

Erik

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" 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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to