HomePhabricator

Merge #12330: Reduce scope of cs_wallet locks in listtransactions

Description

Merge #12330: Reduce scope of cs_wallet locks in listtransactions

Summary:
c409b1adac [rpc] Reduce scope of cs_main and cs_wallet locks in listtransactions (João Barbosa)

Pull request description:

Trivial change, no behaviour change.

Benchmark done as follow:
 - run with `-regtest`
 - wallet with 5000 transactions
 - measured the time spent with the lock and the total time
 - times are an average of 100 `listtransactions --count=...` calls

| `--count` | lock (ms) | total (ms) | saving |
|--:|--:|--:|--:|
| 10 | 0.2230 | 0.2510 | 11% |
| 100 | 2.5150 | 2.8690 | 12% |
| 1000 | 20.0320 | 23.3490 | 14% |
| 10000 | 105.2070 | 125.5310 | 16% |

Tree-SHA512: ebedfeeb4c8ad75c89128e53cae976a82967dbb5ffd129da0f7204ccf9c3c15070b3d509f3767bebd745512e410200cc546147c836e82409f95fc9b8d14fc3ed

Backport of Core PR12330

Reviewer note: the change might be easier to see with w=1.

Test Plan:

cmake -DCMAKE_BUILD_TYPE=Debug -GNinja ..
ninja
ninja check
ninja check-functional

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6302

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Feb 5 2018, 21:16
nakihitoCommitted on Jun 1 2020, 17:00
nakihitoPushed on Jun 1 2020, 17:00
Reviewer
Restricted Owners Package
Differential Revision
D6302: Merge #12330: Reduce scope of cs_wallet locks in listtransactions
Parents
rABC9fc0ab8ec1ea: Add land bot dependencies to base image setup script
Branches
Unknown
Tags
Unknown