cosmos-sdk/client
Emmanuel T Odeke abe3e0c6da
perf: all: remove unnecessary allocations from strings.Builder.WriteString(fmt.Sprintf(...)) (#13230)
This change removes a code pattern that I noticed while on a late night
audit of cosmovisor in which
strings.Builder.WriteString(fmt.Sprintf(...))
calls were being made, yet that's counterproductive to using fmt.Fprintf
which will check whether the writer implements .WriteString and then
avoids the need to firstly build a string using fmt.Sprintf.

The performance wins from this change transcend all dimensions as
exhibited below:

```shell
$ benchstat before.txt after.txt
name            old time/op    new time/op    delta
DetailString-8    5.48µs ±23%    4.40µs ±11%  -19.79%  (p=0.000 n=20+17)

name            old alloc/op   new alloc/op   delta
DetailString-8    2.63kB ± 0%    2.11kB ± 0%  -19.76%  (p=0.000 n=20+20)

name            old allocs/op  new allocs/op  delta
DetailString-8      63.0 ± 0%      50.0 ± 0%  -20.63%  (p=0.000 n=20+20)
```

Fixes #13229
2022-09-09 21:57:46 +00:00
..
config fix: tx commands are no need to specify --chain-id (#12092) 2022-05-31 13:27:52 +00:00
debug feat: List HRP prefixes in Bech32 addresses (#13064) 2022-09-05 14:02:43 +00:00
docs fix: add nft query to swagger.yaml (#12968) 2022-08-20 00:00:05 +02:00
flags docs(cli): improve --gas flag description (#12913) 2022-08-18 22:48:08 +02:00
grpc refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
input chore: gofumpt (#11839) 2022-05-19 10:55:27 +02:00
keys perf: reduce user's password prompts when calling keyring List function (#13207) 2022-09-09 11:38:10 +00:00
pruning feat: Add a cli cmd to prune old states according to current settings (#12742) 2022-09-01 08:42:23 +00:00
rpc perf: all: remove unnecessary allocations from strings.Builder.WriteString(fmt.Sprintf(...)) (#13230) 2022-09-09 21:57:46 +00:00
testutil refactor: remove dependency on simapp from client tests (#12545) 2022-07-12 18:43:02 -05:00
tx refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
v2 build(deps): Bump cosmossdk.io/api from v0.1.0-alpha9 to v0.2.0 (#13206) 2022-09-08 20:36:54 +00:00
account_retriever.go chore!: Refactor x/bank CLI Tests (#12706) 2022-08-03 12:08:41 -04:00
broadcast_test.go chore: downgrade to tendermint v0.34.x (#12958) 2022-08-20 02:33:07 +02:00
broadcast.go chore: downgrade to tendermint v0.34.x (#12958) 2022-08-20 02:33:07 +02:00
cmd_test.go fix(cli): home flag gets ignored when running help (#11645) 2022-04-21 09:27:31 -04:00
cmd.go feat: add customized Ledger support (#12935) 2022-09-07 03:01:19 +00:00
context_test.go refactor: remove simapp from client/server tests (#12676) 2022-07-21 22:01:23 +02:00
context.go refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
grpc_query_test.go refactor: remove simapp from client/server tests (#12676) 2022-07-21 22:01:23 +02:00
grpc_query.go refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
internal_client_test.go fix(codec): MarshalInterface should err when UnmarshalInterface will fail (#12964) 2022-08-19 18:42:55 +00:00
query.go chore!: Refactor x/bank CLI Tests (#12706) 2022-08-03 12:08:41 -04:00
tendermint.go chore: downgrade to tendermint v0.34.x (#12958) 2022-08-20 02:33:07 +02:00
test_helpers.go Replace tmcrypto.PubKey by our own cryptotypes.PubKey (#7419) 2020-11-09 16:01:43 +00:00
tx_config.go feat: add cli for tips transactions (#10311) 2021-12-07 18:02:21 +00:00
utils_test.go client: fix Paginate's arguments validation (#6205) 2020-05-13 13:14:43 +00:00
utils.go chore: downgrade to tendermint v0.34.x (#12958) 2022-08-20 02:33:07 +02:00