-
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
Prevent UI freeze in BSQ dashboard view. #6131
Conversation
Hi @jmacxx Thanks for looking into that. |
Also if the price updates are the reason we should look to other clients listening to it and fix it at the root by throtteling the change of that property. We could make a speacialized IntegerProperty implementation which handles throtteling to avoid that the listeners get flooded. I think for that use case a 1-3 second throttle might be ok. |
The block of price updates happens each time a new trade is added to tradestatistics. I agree that the throttling can be done at the event source; it was only to minimize risk and keep within the scope of your original request that this solution was limited to the |
I think the Actually the caching should be done inside TradeStatisticsManager, its just another view on the data and should use references to avoid increase memory usage with duplicate data. |
desktop/src/main/java/bisq/desktop/main/dao/economy/dashboard/BsqDashboardView.java
Outdated
Show resolved
Hide resolved
Price change events were being fired too frequently and for ccys which had not changed. This caused UI freezing issues most noticably in the DAO dashboard.
I made the requested changes and reverted the initial UI fix as its not needed anymore. |
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.
utACK
core/src/main/java/bisq/core/provider/price/PriceFeedService.java
Outdated
Show resolved
Hide resolved
Thanks @jmacxx Looks good! I will leave my app running a while with that branch to see if I still get issues. Hope there is not more... |
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.
utACK
I left my app running over night with that branch and never got the issue triggered again. So I am pretty sure that PR fixed the observed problem. Great job @jmacxx ! Bug hunter hero! |
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.
utACK based on #6131 (comment)
@chimp1984 asked me to review
DAO -> Facts & Figures -> Dashboard
as it has been freezing the UI.The BSQ dashboard listens to price update events so as to recalculate the UI periodically.
Observation shows that price updates are issued in fast succession for about 100 altcoins.
This PR solves the freezing issue by limiting the refresh rate of
Dashboard
to at most every 10 seconds.Details