mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 13:55:17 +00:00
rpc/jsonrpc/server: ws server optimizations (#5312)
* docs: goleveldb is much more stable now Refs https://github.com/syndtr/goleveldb/issues/226#issuecomment-682495490 * rpc/core/events: make sure WS client receives every event previously, if the write buffer was full, the response would've been lost without any trace (log msg, etc.) * rpc/jsonrpc/server: set defaultWSWriteChanCapacity to 1 Refs #3905 Closes #3829 setting write buffer capacity to 1 makes transactions count per block more stable and also reduces the pauses length by 20s. before: https://github.com/tendermint/tendermint/issues/3905#issuecomment-681854328 net.Read - 20s after: net.Read - 0.66s * rpc/jsonrpc/server: buffer writes and avoid io.ReadAll during read
This commit is contained in:
@@ -18,6 +18,7 @@ func TestMain(m *testing.M) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
app := kvstore.NewPersistentKVStoreApplication(dir)
|
||||
node = rpctest.StartTendermint(app)
|
||||
|
||||
@@ -25,5 +26,6 @@ func TestMain(m *testing.M) {
|
||||
|
||||
// and shut down proper at the end
|
||||
rpctest.StopTendermint(node)
|
||||
_ = os.RemoveAll(dir)
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user