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
{{ message }}
This repository was archived by the owner on Apr 29, 2020. It is now read-only.
* perf: concurrent file import
Adds two new options:
`fileImportConcurrency`
This controls the number of files that are imported concurrently.
You may wish to set this high if you are importing lots of small
files.
`blockWriteConcurrency`
This controls how many blocks from each file we write to disk at
the same time. Setting this high when writing large files will
significantly increase import speed, though having it high when
`fileImportConcurrency` is also high can swamp the process.
It also:
1. Flattens module options because validating deep objects was
clunky and the separation of access to config sub objects within
this module isn't very good
1. Replaces `superstruct` and `deep-extend` with `merge-options`
which is better suited for merging options and is smaller
1. Replaces `async-iterator-*` modules with the more zeitgeisty
`it-*` namespace
Supersedes #38, sort of. No batching but atomicity guarantees are
maintained and performance gains are broadly similar with the right
tuning.
-`maxChildrenPerNode` (positive integer, defaults to `174`): the maximum children per node for the `balanced` and `trickle` DAG builder strategies
136
135
-`layerRepeat` (positive integer, defaults to 4): (only applicable to the `trickle` DAG builder strategy). The maximum repetition of parent nodes for each layer of the tree.
137
136
-`reduceSingleLeafToSelf` (boolean, defaults to `true`): optimization for, when reducing a set of nodes with one node, reduce it to that node.
138
-
-`dirBuilder` (object): the options for the directory builder
139
-
-`hamt` (object): the options for the HAMT sharded directory builder
140
-
- bits (positive integer, defaults to `8`): the number of bits at each bucket of the HAMT
137
+
-`hamtHashFn` (async function(string) Buffer): a function that hashes file names to create HAMT shards
138
+
-`hamtBucketBits` (positive integer, defaults to `8`): the number of bits at each bucket of the HAMT
141
139
-`progress` (function): a function that will be called with the byte length of chunks as a file is added to ipfs.
142
140
-`onlyHash` (boolean, defaults to false): Only chunk and hash - do not write to disk
143
141
-`hashAlg` (string): multihash hashing algorithm to use
144
142
-`cidVersion` (integer, default 0): the CID version to use when storing the data (storage keys are based on the CID, _including_ it's version)
145
143
-`rawLeaves` (boolean, defaults to false): When a file would span multiple DAGNodes, if this is true the leaf nodes will not be wrapped in `UnixFS` protobufs and will instead contain the raw file bytes
146
144
-`leafType` (string, defaults to `'file'`) what type of UnixFS node leaves should be - can be `'file'` or `'raw'` (ignored when `rawLeaves` is `true`)
145
+
-`blockWriteConcurrency` (positive integer, defaults to 10) How many blocks to hash and write to the block store concurrently. For small numbers of large files this should be high (e.g. 50).
146
+
-`fileImportConcurrency` (number, defaults to 50) How many files to import concurrently. For large numbers of small files this should be high (e.g. 50).
0 commit comments