This is an archive of the discontinued Mercurial Phabricator instance.

branchmap: micro-optimize branchinfo
ClosedPublic

Authored by joerg.sonnenberger on Dec 17 2020, 7:30 AM.

Details

Summary

changelogrevision() is supposed to be used if not all data of
changelog.read is used. This is the case here as only the extra field is
used. This also improves extensibility as at least hgext.git doesn't
implement changelog.read.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

You description mention micro-optimisation, but I don't see any number. What's the performance impact of that ?

changelog.read nowadays is literally changelog.changelogrevision followed by creating a tuple from its parts. So this step just skips creating the tuple with unnecessary elements.

marmoute accepted this revision.Jan 8 2021, 11:04 AM
pulkit accepted this revision.Jan 9 2021, 5:04 AM
This revision is now accepted and ready to land.Jan 9 2021, 5:04 AM
This revision was automatically updated to reflect the committed changes.