Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip traversal of pointers with the same cid #109

Merged
merged 1 commit into from
May 11, 2023

Conversation

birdychang
Copy link
Contributor

@birdychang birdychang commented May 11, 2023

Tested with HAMTs with 1M keys and 1k changes.
Reduced test run time from 15.81s to 4.92s.

@JesseXie JesseXie merged commit a0b13f3 into filecoin-project:master May 11, 2023
@@ -192,6 +192,9 @@ func (s *diffScheduler) work(ctx context.Context, todo *task, results chan *Chan
switch {
// both pointers are shards, recurse down the tree.
case prePointer.isShard() && curPointer.isShard():
if prePointer.Link == curPointer.Link {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll want to use link.Equals() for this comparison and else where as they are CIDs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants