This is an archive of the discontinued Mercurial Phabricator instance.

commitctx: reorder some conditional for efficiency in _filecommit

Authored by marmoute on Jul 8 2020, 4:36 AM.



Checking if a dict is empty will be faster than comparing text. I don't expect
it to be a huge performance win, but still a good (but gratuitous) cleanup to
do while we are at it.

This is part of a larger refactoring/cleanup of the commitctx code to clarify
and augment the logic gathering metadata useful for copy tracing. The current
code is a tad too long and entangled to make such update easy. We start with
easy and small cleanup.

Diff Detail

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