[bisq-network/bisq] Optimize AssetService (#4409)
chimp1984
notifications at github.com
Wed Aug 12 21:12:51 UTC 2020
Previous version had several performance issues:
- We kept tradeStatistics in a lookup map in memory (about 40 MB)
- We built up the StatefulAssets even if it was not used/needed.
Building the StatefulAssets was an expensive call.
- AssetTradeActivityCheck was only used for printing out statistics and
called on startup causing performance cost.
Optimized version:
- We call build the StatefulAssets only on demand (user activates
view). Method call takes now 22 ms.
- We create a optimized lookup map with a tuple of the data we need
and keep it as local variable.
- We removed AssetTradeActivityCheck.
Thanks to the profiling reporting from:
https://github.com/bisq-network/proposals/issues/199
<!--
- make yourself familiar with the CONTRIBUTING.md if you have not already (https://github.com/bisq-network/bisq/blob/master/CONTRIBUTING.md)
- make sure you follow our [coding style guidelines][https://github.com/bisq-network/style/issues)
- pick a descriptive title
- provide some meaningful PR description below
- create the PR
- in case you receive a "Change request" and/or a NACK, please react within 30 days. If not, we will close your PR and it can not be up for compensation.
- After addressing the change request, __please re-request a review!__ Otherwise we might miss your PR as we tend to only look at pull requests tagged with a "review required".
-->
Fixes #replaceWithIssueNr, fixes #replaceWithIssueNr
Your PR description here.
You can view, comment on, or merge this pull request online at:
https://github.com/bisq-network/bisq/pull/4409
-- Commit Summary --
* Optimize AssetService
-- File Changes --
M core/src/main/java/bisq/core/app/BisqSetup.java (11)
M core/src/main/java/bisq/core/dao/governance/asset/AssetService.java (291)
M core/src/main/java/bisq/core/trade/TradeModule.java (2)
D core/src/main/java/bisq/core/trade/statistics/AssetTradeActivityCheck.java (222)
M desktop/src/main/java/bisq/desktop/main/dao/burnbsq/assetfee/AssetFeeView.java (53)
-- Patch Links --
https://github.com/bisq-network/bisq/pull/4409.patch
https://github.com/bisq-network/bisq/pull/4409.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4409
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200812/fac22d56/attachment-0001.html>
More information about the bisq-github
mailing list