This is an archive of the discontinued Mercurial Phabricator instance.

fastannotate: pass commitctx to filectx to prevent tree downloads
ClosedPublic

Authored by durham on Nov 21 2017, 5:32 PM.
Tags
None
Subscribers

Details

Summary

Previously fastannotate was creating filectx's by doing commitctx[path]. This
invokes logic that resovles the filenode immediately, which require loading the
manifest for that commit. In a repo where manifests are downloaded lazily, this
can result in a lot of time spent downloading manifests.

Since commands like hg blame -u only need the filectx so they can resolve the
commitctx for commit information, let's just pass the commitctx straight to the
filectx. It can later derive the filenode if it needs to.

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

durham created this revision.Nov 21 2017, 5:32 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 21 2017, 5:32 PM
quark accepted this revision.Nov 21 2017, 9:30 PM
quark added a subscriber: quark.

Thanks!

This revision is now accepted and ready to land.Nov 21 2017, 9:30 PM
This revision was automatically updated to reflect the committed changes.