This is an archive of the discontinued Mercurial Phabricator instance.

undo: preview perf improvements
ClosedPublic

Authored by felixmerk on Aug 21 2017, 2:31 PM.
Tags
None
Subscribers

Details

Reviewers
quark
Group Reviewers
Restricted Project
Commits
rFBHGX2ed26f4a0c71: undo: preview perf improvements
Summary

Based on Adam Simpkin's ideas, faster code for the template functions.

Diff Detail

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

Event Timeline

felixmerk created this revision.Aug 21 2017, 2:31 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 21 2017, 2:31 PM
quark accepted this revision.Aug 21 2017, 3:18 PM
quark added a subscriber: quark.

It's now binary nodes, so maybe hex should be removed. But I'm fine with doing that in a later patch.

This revision is now accepted and ready to land.Aug 21 2017, 3:18 PM
quark added inline comments.Aug 21 2017, 3:20 PM
hgext3rd/undo.py
549

It seems _oldmarks is just a hex node. In this case we can avoid creating a ctx object:

ctxhex = ctx.hex()
for ...
    if kv[1] == ctxhex:
quark added inline comments.Aug 21 2017, 3:24 PM
hgext3rd/undo.py
529

This could also be optimized to avoid create a ctx (repo[...]) object.

felixmerk updated this revision to Diff 1132.Aug 21 2017, 4:27 PM
This revision was automatically updated to reflect the committed changes.