Turns out that `pool.Put(buf)` had to *allocate* because we needed to turn
`[]byte` into `interface{}`. Apparently, we've never done this correctly we just
never noticed because we never really used buffer pools extensively.
However, since migrating yamux to a buffer-pool backed buffer, this started
showing up in allocation profiles.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
* go-datastore and friends: GetSize
* badger: new release, fewer allocations
* go-mplex: send fewer packets
* go-bitswap: pack multiple blocks in a single message, fewer allocations
* go-buffer-pool: replace the buffer pool from go-msgio
* yamux: fixed data race and uses go-buffer-pool for stream read-buffers to
reduce memory and allocations.
* go-libp2p-secio: get rid of a hot-spot allocation
* go-libp2p-peerstore: reduced allocations (at the cost of some memory)
More?
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
excerpt of commit messages:
- update postrun functions in core/commands
- sharness: allow setting -i with TEST_IMMEDIATE=1
- cmds Run func returns error now
- gx update cmdkit to 1.1.2 and cmds to 2.0.0-beta1
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
* Most of our datastores barf on non []byte values.
* We have to have a bunch of "is this a []byte" checks.
* Saves some allocations.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
The progressbar should now correctly calculate the size of a directory (by
ignoring the directory sizes).
fixes#5288
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This module was sort of extracted to whyrusleeping/tar-utils long ago.
I gxed that, imported commits from go-ipfs to the current state, and
extracted it.
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
otherwise, we block on required arguments from stdin before processing the help
flag.
fixes#4837
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This way, we can always assume that indexing a required argument works.
Also:
* test that the command tree doesn't have any obvious bugs (duplicate options,
arguments in the wrong order, etc).
* simplify the usage ParseBodyArgs.
* remove unnecessary check in the get command.
fixes#4823
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
It strips the last `/` which was part of a partial fix for #3729. Unfortunately,
it's not a *real* fix but we might as well leave this as it is until we
completely fix it.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>