This is an archive of the discontinued Mercurial Phabricator instance.

remotefilelog: add seen set to annotate algorithm
ClosedPublic

Authored by durham on Sep 21 2017, 6:23 PM.
Tags
None
Subscribers

Details

Reviewers
quark
Group Reviewers
Restricted Project
Commits
rFBHGXad5622aae1ba: remotefilelog: add seen set to annotate algorithm
Summary

The remotefilelog annotate logic was not keeping track of which commits it had
seen when doing the bfs ancestor walk. For very mergy histories this resulted in
a ton of duplicate work.

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.Sep 21 2017, 6:23 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 21 2017, 6:23 PM
quark added a subscriber: quark.Sep 21 2017, 6:26 PM
quark added inline comments.
remotefilelog/remotefilectx.py
384

Could we check and set seen here? It looks simpler.

durham added inline comments.Sep 21 2017, 6:36 PM
remotefilelog/remotefilectx.py
384

If we check it here we can end up queueing things we don't need to queue. In a theoretical bfs that could end up queueing a lot of extra things. That's unlikely in a commit graph, but I figured might as well be efficient.

quark accepted this revision.Sep 21 2017, 6:56 PM
This revision is now accepted and ready to land.Sep 21 2017, 6:56 PM
This revision was automatically updated to reflect the committed changes.