Skip to content

LoadBlockIndexDB speed-up for non-LWMAPOS chains (x5 perfomance boost)#1566

Merged
jl777 merged 1 commit intojl777:FSMfrom
DeckerSU:patch-loadblockindexdb
Jun 16, 2019
Merged

LoadBlockIndexDB speed-up for non-LWMAPOS chains (x5 perfomance boost)#1566
jl777 merged 1 commit intojl777:FSMfrom
DeckerSU:patch-loadblockindexdb

Conversation

@DeckerSU
Copy link
Copy Markdown

seems we had CChainPower classes compare here from Verus, it's slow, bcz of hard
arith_uint256 math in bool operator<(const CChainPower &p1, const CChainPower &p2),
this slows down setBlockIndexCandidates.insert operations in LoadBlockIndexDB(),
so, for faster block index db loading we will use check from Verus only for LWMAPOS
enabled chains.

perfomance test (daemon load time from start):

without fix - 3m42sec
   with fix - 39sec

seems we had CChainPower classes compare here from Verus, it's slow, bcz of hard
arith_uint256 math in bool operator<(const CChainPower &p1, const CChainPower &p2),
this slows down setBlockIndexCandidates.insert operations in LoadBlockIndexDB(),
so, for faster block index db loading we will use check from Verus only for LWMAPOS
enabled chains.

perfomance test (daemon load time from start):

without fix - 3m42sec
   with fix - 39sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants