Skip to content

Commit

Permalink
Merge pull request ipfs#34 from ipfs/fix/fast-read
Browse files Browse the repository at this point in the history
fix some performance regressions when reading protobuf nodes
  • Loading branch information
Stebalien authored Feb 28, 2019
2 parents 11062dc + 3bdd47f commit de6f1da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion coding.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func DecodeProtobufBlock(b blocks.Block) (ipld.Node, error) {
}

decnd.cached = c
decnd.SetCidBuilder(c.Prefix())
decnd.builder = c.Prefix()
return decnd, nil
}

Expand Down
1 change: 0 additions & 1 deletion node.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func (n *ProtoNode) SetCidBuilder(builder cid.Builder) {
n.builder = v0CidPrefix
} else {
n.builder = builder.WithCodec(cid.DagProtobuf)
n.encoded = nil
n.cached = cid.Undef
}
}
Expand Down

0 comments on commit de6f1da

Please sign in to comment.