This should help us have a better idea of what "interpreter startup
costs" look like. This does omit the HGUNICODEPEDANTRY block and the
LIBDIR dancing to set up sys.path, but the former is usually off and
the latter is unavoidable and should be very fast. If we get worried
about those cases we can consider open-coding the tracing logic here.
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG5e78c100a215: hg: wrap the highest layer in the `hg` script possible in trace event
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
hg | ||
---|---|---|
14–21 | I think we want to defer the import until after reload(sys). Keep in mind that importing the sub-module will import the parent one. And the parent one contains code that is somewhat important. But we still want to measure time spent here. This may warrant a one-off hack to record a session ID and raw times here and to feed that into the tracer manually after we've done this extremely early setup. |
hg | ||
---|---|---|
23–30 | Attempting to import hgdemandimport before this block is wrong, since we may fail to find the hgdemandimport package. I think we'll want to record trace events / times in this file explicitly and then generate trace events for them only once the environment is set up. Truth be told, I don't expect much time to be spent between lines 12 and 28 of the current file. So I'm not sure it is worth going through this trouble. Although I would love to be proved wrong! |
I think we want to defer the import until after reload(sys). Keep in mind that importing the sub-module will import the parent one. And the parent one contains code that is somewhat important.
But we still want to measure time spent here. This may warrant a one-off hack to record a session ID and raw times here and to feed that into the tracer manually after we've done this extremely early setup.