Counting the number of open() is related to startup speed, but it does not 
account for the majority of the startup time unless you run on NFS. Its 
also important  that modules don't do computations on import., 
see sage/misc/latex_macros.py for an example of how not to do things (and 
flask.babel). You are mostly counting the length of sys.path, which is good 
to keep short but then you can just check len(sys.path).






On Monday, August 13, 2012 10:57:22 AM UTC-4, Jeroen Demeyer wrote:
>
> I am running the following command from various versions of Sage: 
>
> ./sage -sh -c 'IPYTHONDIR="$DOT_SAGE/ipython" IPYTHONRC=ipythonrc strace 
> 2>&1 >/dev/null python "$SAGE_LOCAL/bin/sage-ipython" -i' </dev/null 
> |grep -c '^open(' 
>
> This shows the number of open() system calls in a Sage run (whether they 
> are successful calls or not).  These calls seem to be responsible of the 
> majority of the startup time.  The big advantage is that this is a much 
> more stable metric, i.e. it doesn't depend on the system load, whether 
> files are cached or hardware speed. 
>
> The results on sage.math: 
>
> sage-4.6: 19834 
> sage-4.7: 20114 
> sage-4.8: 19496 
> sage-5.0.1: 19061 
> sage-5.1: 18976 
> sage-5.2: 29818 
>
> I propose this is made into a doctest to replace the current startup.py 
> test.  One could debate whether to count all system calls, all 
> file-related system call, only failed calls... 
>

-- 
-- 
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