-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize AssetService #4409
Optimize AssetService #4409
Conversation
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: bisq-network/proposals#199
Private constructors are OK if injection is used. Empty methods are also ok if requires for interface...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Would prefer to have pure refactoring as separate commits for easier review.
Added a couple of suggestions before merging.
Needs review from @ManfredKarrer since it touches core/dao
desktop/src/main/java/bisq/desktop/main/dao/burnbsq/assetfee/AssetFeeView.java
Outdated
Show resolved
Hide resolved
….java Co-authored-by: sqrrm <[email protected]>
…ssetFeeView.java Co-authored-by: sqrrm <[email protected]>
Agree. Sorry. |
utACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Previous version had several performance issues:
Building the StatefulAssets was an expensive call.
called on startup causing performance cost.
Optimized version:
view). Method call takes now 22 ms.
and keep it as local variable.
Thanks to the profiling reporting from:
bisq-network/proposals#199