Page MenuHomePhabricator

Improve mempool trimming performance
ClosedPublic

Authored by Fabien on Dec 16 2022, 17:19.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC854f52fd5731: Improve mempool trimming performance
Summary

The trimming algorithm will happily copy all the transactions that are getting evicted so they can be parsed and the coin view updated. This is due to the algorithm being written prior to the existence of CTransactionRef, aka shared_ptr<const CTransaction>, which will let us hold the pointer instead even after the transaction has been removed from the mempool.

Note that the MempoolEviction benchmark does not show any significant performance difference with previous code (increase the benchmark min time, see D12903).

There is no change in behavior.

Test Plan
ninja check-extended

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable