This is an archive of the discontinued Mercurial Phabricator instance.

perf: add perfprogress command
ClosedPublic

Authored by indygreg on Dec 10 2018, 3:15 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Commits
rHG008f3491dc53: perf: add perfprogress command
Summary

I've noticed that progress bars can add significant overhead to tight
loops. Let's add a perf command that attempts to isolate that overhead.

With a default hgrc, iteration over 1M items appears to take ~3.75s on
my machine. Profiling reveals ~28% of time is spent in ui.configbool()
resolving the value of the progress.debug config option.

Even if I set progress.disable=true, execution still takes ~2.60s, with
~59% of the time spent in ui.configbool().

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Dec 10 2018, 3:15 PM
This revision was automatically updated to reflect the committed changes.