Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1231: [Wallet] IsEquivalentTo commented, removing an extra rou…
…nd of ser+hash calculation. 24fb46d [Wallet] IsEquivalentTo commented for now to not add an extra round of serialization + hash calculation in every read transaction in the wallet startup. (furszy) Pull request description: To explain the reason that forced me to hunt this for over a week.. In huge wallets (+100k txs wallets) the 4.0 startup time is taking +30 minutes. Which is crazy long and sounded much more as a regression over 3.4 which was taking less than 10 minutes. Root cause: After some time (and improvements over different areas #1217), found that the `IsEquivalentTo` method is adding an extra round of serialization + hash calculation on every transaction that is loaded into the wallet. Which gets really, time-wise, expensive in big wallets for a small benefit. Test: Environment: - Wallet with 419,633 db records. - MacOS i7, 16gb ram. Pre-PR transactions load time: 30 minutes and i got bored and killed the process.. Post-PR transactions load time: 34.369 seconds. For now, decided to just comment it to be able to release 4.0.1 as soon as possible with all of the improvements. The final, future, goal of course it's not this one, we need to backport the whole `loadToWallet` flow from upstream + introduce our own changes there. Just a first initial step solving the regression. ACKs for top commit: Fuzzbawls: ACK 24fb46d random-zebra: ACK 24fb46d and merging... Tree-SHA512: bd4b7b34b60eabf9ebe555312bbb26373430057bff07d1ee1d0bc137004dd47bfbf3d263e146113e347b3a767b4e01376fdf3b2984abd4b321d188ac91cfa391
- Loading branch information