You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#8794Fixes#8791
This adds:
- skip-raw-leaves option, that avoids downloading raw leaves when you
already know their size in the parrent block
- multithreaded download
- properly count blocks that show up multiple times with different
multicodec
- do not count size of inlined blocks
Speed:
Way way faster (it's hard to make an objective number because that depends a lot on how much multithreading helps you and how many raw-leaves block you skip), in my case: `>100x` faster.
Copy file name to clipboardExpand all lines: core/commands/dag/dag.go
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,11 @@ import (
17
17
)
18
18
19
19
const (
20
-
pinRootsOptionName="pin-roots"
21
-
progressOptionName="progress"
22
-
silentOptionName="silent"
23
-
statsOptionName="stats"
20
+
pinRootsOptionName="pin-roots"
21
+
progressOptionName="progress"
22
+
skipRawleavesOptionName="skip-raw-leaves"
23
+
silentOptionName="silent"
24
+
statsOptionName="stats"
24
25
)
25
26
26
27
// DagCmd provides a subset of commands for interacting with ipld dag objects
@@ -305,6 +306,7 @@ Note: This command skips duplicate blocks in reporting both size and the number
305
306
},
306
307
Options: []cmds.Option{
307
308
cmds.BoolOption(progressOptionName, "p", "Return progressive data while reading through the DAG").WithDefault(true),
309
+
cmds.BoolOption(skipRawleavesOptionName, "s", "Skip raw leaves block when size is already known, faster but can lead to underestimating the size with malformed DAGs.").WithDefault(true),
0 commit comments