-
Notifications
You must be signed in to change notification settings - Fork 20
perf: fixes #97 by not sorting DAGNode links when they are already sorted #98
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit lint failed https://ci.ipfs.team/blue/organizations/jenkins/IPLD%2Fjs-ipld-dag-pb/detail/PR-98/1/pipeline/269. Subject is too long.
f003847
to
ccf8b5e
Compare
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
==========================================
- Coverage 90.8% 90.28% -0.53%
==========================================
Files 13 13
Lines 272 278 +6
==========================================
+ Hits 247 251 +4
- Misses 25 27 +2
Continue to review full report at Codecov.
|
@vmx have updated the commit message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge it once CI passed.
ccf8b5e
to
20f4cae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@achingbrain Can you please add a test for serialize()
with an invalid node? I don't think we need to cover all error branches, but I haven't found a single test for invalid data.
See #97 for context. Essentially when we are deserializing a DAGNode from a buffer, the links should already be sorted so just new up a DAGNode object and return it. Though we still have to calculate what the CID was that may have been used to load this DAGNode. See ipld/js-ipld#173 for further discussion on that point.