HomePhabricator

perftweaks: micro optimization about branchcache.update

Authored by quark.

Description

perftweaks: micro optimization about branchcache.update

This patch did two micro optimizations:

  • Avoid sorting headrevs since it's already sorted.
  • Inline cl.node so there is no node hash table lookups inside the loop.

These are good practices. Although practically we don't have that many
headrevs to notice a difference.

Differential Revision: https://phab.mercurial-scm.org/D1452

Details

Committed
quarkNov 21 2017, 6:41 PM
Differential Revision
D1452: perftweaks: micro optimization about branchcache.update
Parents
rFBHGXbd59d1dd1553: perftweaks: do not update branchcache cache keys
Branches
Unknown
Tags
Unknown