On Fri, Aug 10, 2012 at 5:51 PM, William Stein <wst...@gmail.com> wrote:
> Hi,
>
> I'm sad that on a fast SSD repeatedly doing the following:
>
> wstein@geom:/usr/local/sage/sage-5.2$ time echo "" | ./sage
> ----------------------------------------------------------------------
> | Sage Version 5.2, Release Date: 2012-07-25                         |
> | Type "notebook()" for the browser-based notebook interface.        |
> | Type "help()" for help.                                            |
> ----------------------------------------------------------------------
> sage: sage:
> Exiting Sage (CPU time 0m0.03s, Wall time 0m0.03s).
>
> real    0m1.902s
> user    0m1.428s
> sys     0m0.424s
>
> always outputs 1.9 seconds!   That test was < 1 second on sage.math
> when I put in a doctest to make sure it didn't exceed that 1 second,
> when we were trying to improve the sage startup time.  In the
> intervening year (?), the test is ignored or gone, and the startup
> time seems to have got a bit worse.  Dang.
>
> On another faster machine, I'm getting:
>
> wstein@combinat:/usr/local/sage/sage-5.2$ time echo "" | ./sage
> ----------------------------------------------------------------------
> | Sage Version 5.2, Release Date: 2012-07-25                         |
> | Type "notebook()" for the browser-based notebook interface.        |
> | Type "help()" for help.                                            |
> ----------------------------------------------------------------------
> sage: sage:
> Exiting Sage (CPU time 0m0.04s, Wall time 0m0.05s).
>
> real    0m1.580s
> user    0m1.224s
> sys     0m0.356s
>
>
> Any ideas?

This is really frustrating. I find myself using (I)Python when I would
have used Sage sometimes just because it takes too long to start up.

It looks like the time was bumped up a year and a half ago:
http://trac.sagemath.org/sage_trac/ticket/10614

There are some fundamental restrictions of LazyImport with respect to
instances created at startup time, but it works great for functions. I
think sage.schemes.all (320 ms) and sage.plot.all (100ms) are good
candidates for this.

Overall, I think it's basically it's everyone being aware that when
they import something into the global namespace, there is a startup
time cost. It's probably much smaller than the variance for most
tickets, or it would be interesting to try to detect this. We could
add a plugin to the patchbot to list *new* modules imported at startup
by examining sys.modules.

- Robert

-- 
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org



Reply via email to