Opened 9 years ago
Closed 9 years ago
#13361 closed enhancement (fixed)
Report startuptime exclusive children
Reported by: | vbraun | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-5.4 |
Component: | performance | Keywords: | |
Cc: | Merged in: | sage-5.4.beta2 | |
Authors: | Volker Braun | Reviewers: | John Palmieri |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Right now sage -startuptime
reports startup time including children. This isn't particularly useful since that just means that the first module (which loads most of sage as dependencies) is the slowest. The more meaningful number is exclusive children, which can tell us if the module does computations during initialization.
- Apply trac_13361_startuptime.patch to the scripts (
SAGE_LOCAL/bin
) repository. - Apply trac_13361_startuptime_args.patch and trac_13361-root-referee.patch to the root repository.
- Apply trac_13361_fix_test.patch and trac_13361-sagelib-referee.patch to the Sage library
Attachments (6)
Change History (18)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
- Description modified (diff)
comment:3 Changed 9 years ago by
- Description modified (diff)
Now with disabled garbage collector (it did skew timings) and with optional argument a module that you want to know more about:
[vbraun@laptop sage]$ sage -startuptime sage.geometry.fan ======================================================================== == Slowest modules imported by sage.geometry.fan ======================= exclude/ms include/ms #parents module name 0.114 51.802 3 sage.geometry.all 0.220 0.240 1 sage.schemes.toric.library 0.353 0.414 1 sage.geometry.triangulation.fan_refinement 0.404 0.492 2 sage.geometry.fan_morphism 0.688 0.962 3 sage.schemes.toric.variety == Slowest modules importing sage.geometry.fan ========================= exclude/ms include/ms #parents module name 0.526 2.551 19 collections 0.607 139.657 51 sage.misc.all 0.617 67.490 5 sage.combinat.posets.posets 0.770 2.764 4 sage.geometry.lattice_polytope 0.779 49.771 5 sage.geometry.cone 1.123 1.126 175 sage.misc.abstract_method 1.243 1.243 180 sage.misc.lazy_attribute 1.284 66.645 230 sage.rings.all 1.350 1.350 63 copy 3.897 5.520 218 sage.misc.sageinspect == module sage.geometry.fan ============================================ Time to import: 0.760ms Cumulative time: 0.835ms Names: fan, sage.geometry.fan
comment:4 Changed 9 years ago by
New patch has better handling of ambiguous command line argument and prints module file.
comment:5 Changed 9 years ago by
- Description modified (diff)
comment:6 Changed 9 years ago by
- Description modified (diff)
- Reviewers set to John Palmieri
Two questions:
- would it be useful to be able to sort by times including children (keeping the default as is) by specifying a command-line argument? (I don't know the answer to this one.)
- should the usage
sage --startuptime [modulename]
be documented insage --advanced
and indevel/sage/doc/en/reference/options.rst
? (I think the answer to this one is "yes". See the attached referee patches.)
comment:7 Changed 9 years ago by
I don't think there is much point in the inclusive startup time, that just tells you which library was imported first (and then pulled in a lot of sage modules for the first time). Thats why the old startuptime always showed a ridiculously long time for sage.algebras.iwahori_hecke_algebra
despite this being a very lightweight module.
Thanks for the referee patches, they look great!
comment:8 Changed 9 years ago by
- Status changed from needs_review to positive_review
comment:9 Changed 9 years ago by
- Status changed from positive_review to needs_work
Oops, we missed one thing: the test in tests/startup.py has to be rewritten to take into account the changed output of sage --startuptime
. (This will only make a difference when testing on sage.math.)
comment:10 Changed 9 years ago by
- Status changed from needs_work to needs_review
I've added to my referee's patch to fix the doctest in tests/startup.py. Also, now if the test fails, it prints how long sage --startuptime
took, instead of just returning False
.
comment:11 Changed 9 years ago by
- Status changed from needs_review to positive_review
Hmm a hostname-dependent doctest ;-)
Thanks for the patch, looks good!
comment:12 Changed 9 years ago by
- Merged in set to sage-5.4.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
Initial patch