mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
3a97953152
Alleviate a cubic time bug during the update of the bonded roles repository, reducing it to quadratic running time. On Mainnet, this gives a roughly ten-fold speedup and should allow better scaling in the event that many new bonded roles are added. Replace calls to 'BondedRolesRepository.findBondedAssetByHash' with a lookup into a lazily initialised map of bonded assets (Roles) by hash (reset at the start of each call to 'BondRepository.update()' to prevent stale caching). This avoids rescanning the roles list for every pair of roles and lockup tx outputs, thus reducing the number of steps (to highest order) from: #roles * #roles * #lockup-tx-outputs to: #roles * #lockup-tx-outputs (The logs show 2 or 3 calls to 'BondedRepository.update()' every time a new block arrives, and while this was only taking around a second or so on Mainnet, it could potentially grow to something problematic with cubic scaling in the number of bonded roles.) |
||
---|---|---|
.. | ||
.tx | ||
src | ||
build.gradle | ||
update_translations.sh |