Ticket #3572 (new enhancement)

Opened 5 months ago

Last modified 2 months ago

[with patch; needs work] optimize sage startup time by not importing any modules that import linbox by default.

Reported by: was Assigned to: cwitty
Priority: major Milestone: sage-3.2.2
Component: misc Keywords:
Cc:

Attachments

sage-3572.patch (8.4 kB) - added by was on 07/06/2008 03:43:20 PM.

Change History

07/06/2008 03:42:55 PM changed by was

  • summary changed from optimize sage startup time by not importing any modules that import linbox by default. to [with patch; needs review] optimize sage startup time by not importing any modules that import linbox by default..

07/06/2008 03:43:20 PM changed by was

  • attachment sage-3572.patch added.

07/06/2008 03:46:01 PM changed by was

on osx, BEFORE:

teragon-2:matrix was$ sage -startuptime |grep linbox
            sage.libs.linbox.linbox: 0.270 (matrix_modn_dense)
0.270 sage.libs.linbox.linbox (matrix_modn_dense)

AFTER

teragon-2:matrix was$ sage -startuptime |grep linbox
teragon-2:matrix was$ 

Of course now,

sage: time a = matrix(ZZ,2)
CPU times: user 0.34 s, sys: 0.01 s, total: 0.35 s
Wall time: 0.36 s
sage: time a = matrix(ZZ,3)
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s

but that makes a lot of sense. Only make people pay if they use the goods.

William

07/06/2008 09:21:53 PM changed by mabshoff

  • summary changed from [with patch; needs review] optimize sage startup time by not importing any modules that import linbox by default. to [with patch; needs works] optimize sage startup time by not importing any modules that import linbox by default..

With this patch applied against 3.0.4.alpha2 I get one doctest failure:

mabshoff@sage:/scratch/mabshoff/release-cycle/sage-3.0.4.alpha2$ ./sage -t -long devel/sage/sage/misc/session.pyx
sage -t -long devel/sage/sage/misc/session.pyx              
**********************************************************************
File "/scratch/mabshoff/release-cycle/sage-3.0.4.alpha2/tmp/session.py", line 212:
    sage: save_session('session', verbose=True)
Expected:
    Not saving ...
Got:
    Saving doctest
    Saving a
    Not saving example_2: example_2 is a function
    Not saving example_3: example_3 is a function
    Not saving example_0: example_0 is a function
    Not saving example_1: example_1 is a function
    Not saving example_4: example_4 is a function
    Not saving example_5: example_5 is a function
    Saving __file__
    Not saving f: f is a function
    Saving __doc__
    Saving __builtins__
    Saving __name__
**********************************************************************
1 items had failures:
   1 of  10 in __main__.example_4
***Test Failed*** 1 failures.
For whitespace errors, see the file /scratch/mabshoff/release-cycle/sage-3.0.4.alpha2/tmp/.doctest_session.py
	 [2.0 s]
exit code: 1024

Cheers,

Michael

09/28/2008 05:14:35 PM changed by mabshoff

  • summary changed from [with patch; needs works] optimize sage startup time by not importing any modules that import linbox by default. to [with patch; needs work] optimize sage startup time by not importing any modules that import linbox by default..