-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 trade chart view [6] #5794
Optimize trade chart view [6] #5794
Commits on Nov 9, 2021
-
Move getAveragePrice and roundToTick to ChartCalculations
Make buildUsdPricesPerTickUnit static and pass params Rename usdPriceMapsPerTickUnit to usdAveragePriceMapsPerTickUnit Rename local variable map to usdAveragePriceMap Move method calls syncPriceFeedCurrency() and setMarketPriceFeedCurrency() before other calls (those will become async later)
Configuration menu - View commit details
-
Copy full SHA for c51060a - Browse repository at this point
Copy the full SHA c51060aView commit details -
Configuration menu - View commit details
-
Copy full SHA for deeb912 - Browse repository at this point
Copy the full SHA deeb912View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea66a51 - Browse repository at this point
Copy the full SHA ea66a51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0271af9 - Browse repository at this point
Copy the full SHA 0271af9View commit details -
Add static method getTradeStatisticsForCurrency and
use it instead of updateSelectedTradeStatistics (preparation for follow up commit)
Configuration menu - View commit details
-
Copy full SHA for ca145b0 - Browse repository at this point
Copy the full SHA ca145b0View commit details -
Convenience util for CompletableFuture.allOf method
Configuration menu - View commit details
-
Copy full SHA for 603e9fd - Browse repository at this point
Copy the full SHA 603e9fdView commit details -
Add async handling with CompletableFuture to fillList
The creation of TradeStatistics3ListItem is rather fast but the applying to the list is due sorting pretty slow (300 ms) as its > 100k items. We do the applying on the callback thread. Seems JavaFx permits that. So we can keep the UI thread unblocked. Remove modelReadyListener Renamed model.selectedTradeStatistics to model.tradeStatisticsByCurrency
Configuration menu - View commit details
-
Copy full SHA for 65706e7 - Browse repository at this point
Copy the full SHA 65706e7View commit details -
Run getUsdAveragePriceMapsPerTickUnit and getTradeStatisticsForCurrency
in parallel and once both are done we call asyncUpdateChartData (not yet refactored). Clear all data at deactivate This cause a bit of costs when we activate again but as we delegate now all work to threads it should be OK. It decreases the memory usage if we do not keep those data in the fields. The View classes are cached in the view loader so all data in fields stays in memory once it was activated once and not manually cleared in deactivate. Move getTradeStatisticsForCurrency to ChartCalculations Rename buildUsdPricesPerTickUnit to getUsdAveragePriceMapsPerTickUnit Rename selectedTradeStatistics to tradeStatisticsByCurrency Make itemsPerInterval final Remove modelReady Add deactivateCalled flag
Configuration menu - View commit details
-
Copy full SHA for 7ad5993 - Browse repository at this point
Copy the full SHA 7ad5993View commit details -
Move getUpdateChartResult, getCandleData, getTimeFromTickIndex to Cha…
…rtCalculations Make maxTicks static and rename to MAX_TICKS
Configuration menu - View commit details
-
Copy full SHA for 041b07e - Browse repository at this point
Copy the full SHA 041b07eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce8a91f - Browse repository at this point
Copy the full SHA ce8a91fView commit details -
Do sorting on non UI thread as its slow and only attach
it to table in UI thread afterwards. Chain updateSelectedTradeStatistics and updateChartData calls.
Configuration menu - View commit details
-
Copy full SHA for a659a78 - Browse repository at this point
Copy the full SHA a659a78View commit details -
Configuration menu - View commit details
-
Copy full SHA for c209da7 - Browse repository at this point
Copy the full SHA c209da7View commit details