- 30 Mar, 2021 3 commits
-
-
Daniel Martí authored
Like the previous commit, this helps reduce allocations as well as improve performance thanks to the well-optimized protowire package. And, as before, we get to remove unnecessary code. name old time/op new time/op delta Roundtrip-8 4.81µs ± 0% 4.35µs ± 1% -9.59% (p=0.004 n=5+6) name old alloc/op new alloc/op delta Roundtrip-8 7.14kB ± 0% 6.86kB ± 0% -3.83% (p=0.000 n=6+5) name old allocs/op new allocs/op delta Roundtrip-8 119 ± 0% 112 ± 0% -5.88% (p=0.002 n=6+6)
-
Daniel Martí authored
IPLD's codec helper reader has a relatively high cost, unfortunately. It was the main contributor to a slowdown in go-merkledag when moving from the old protobuf gogo-generated decoder to go-codec-dagpb. Using a []byte also means we can reuse protobuf's well-optimized "wire encoding" helpers, which gets us extra speed and allows removing some code. This should not matter in practice for the time being, as the only go-codec-dagpb user is go-merkledag and it uses bytes.Buffer everywhere. In the future it would be nice for go-codec-dagpb to be just as efficient with a stream decoder, but right now I don't have the extra week to get into that. Plus, if the core protobuf implementation works on []byte, one can assume it's reasonable for us to do the same. Using the new BenchmarkRoundtrip in go-merkledag with go-codec-dagpb, we get a significant uplift in performance: name old time/op new time/op delta Roundtrip-8 6.49µs ± 1% 5.34µs ± 1% -17.74% (p=0.002 n=6+6) name old alloc/op new alloc/op delta Roundtrip-8 8.07kB ± 0% 7.50kB ± 0% -7.04% (p=0.002 n=6+6) name old allocs/op new allocs/op delta Roundtrip-8 171 ± 0% 148 ± 0% -13.45% (p=0.002 n=6+6)
-
Daniel Martí authored
std's errors has had wrapping for years now.
-
- 29 Mar, 2021 5 commits
- 27 Mar, 2021 1 commit
-
-
web3-bot authored
-
- 17 Mar, 2021 1 commit
-
-
Daniel Martí authored
We're a semver v1, so we can't remove exposed APIs unless we bump to v2+. Bumping the major version to just rename two APIs seems a bit overkill; keeping the old ones around and deprecating them is much easier. This partially reverts commit b8473079.
-
- 16 Mar, 2021 1 commit
-
-
Daniel Martí authored
At least go-merkledag and go-graphsync still need a prototype chooser, and go-ipld-prime-proto provides one, so this simplifies integration with downstreams. It's worth noting that we just add PBNode here, while go-ipld-prime-proto also added RawNode. This is because this dag-pb module leaves raw nodes out, since those are now in go-ipld-prime/codec/raw. The logic is just three lines, but it's still easier to not have to copy-paste these between different projects.
-
- 15 Mar, 2021 4 commits
-
-
Alex Cruikshank authored
make compatible with ipld-prime linksystem changes
-
acruikshank authored
-
Eric Myhre authored
A similar change to Encode and Decode function names came in go-ipld-prime v0.9.0, so this keeps this library in sync. Improved package docs a bit to talk about the new go-ipld-prime LinkSystem, which is a bit clearer to refer to than before. Target-of-opportunity fix some typos in docs.
-
acruikshank authored
-
- 08 Mar, 2021 1 commit
-
-
acruikshank authored
-
- 28 Feb, 2021 1 commit
-
-
ipldbot authored
-
- 26 Feb, 2021 2 commits
-
-
Daniel Martí authored
The module was defined as github.com/ipld/go-codec-dagpb/dagpb, but the repository is at github.com/ipld/go-codec-dagpb. This means that neither can be resolved as a valid Go package import path; the former results in a GitHub 404, and the latter results in a valid GitHub repository which holds a different module. Rod confirmed that the /dagpb suffix wasn't intentional, so just get rid of it. While at it, mod tidy.
-
ipldbot authored
-
- 25 Feb, 2021 6 commits
-
-
github-actions[bot] authored
-
github-actions[bot] authored
-
ipldbot authored
-
ipldbot authored
-
github-actions[bot] authored
-
ipldbot authored
-
- 10 Jan, 2021 1 commit
-
-
ipldbot authored
-
- 01 Jan, 2021 3 commits
-
-
ipldbot authored
-
Rod Vagg authored
-
Rod Vagg authored
Fixes: https://github.com/ipld/go-codec-dagpb/pull/3
-
- 14 Dec, 2020 2 commits
- 09 Dec, 2020 2 commits
- 08 Dec, 2020 6 commits
- 07 Dec, 2020 1 commit
-
-
Rod Vagg authored
-