mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Now that the trade statistics are encountered in chronological order, speed up 'roundToTick(LocalDateTime, TickUnit)' by caching the last calculated LocalDateTime -> Date mapping from the tick start (with one cache entry per tick unit), as multiple successive trades will tend to have the same tick start. This avoids a relatively expensive '.atZone(..).toInstant()' call, which was slowing down 'ChartCalculations.getUsdAveragePriceMapsPerTickUnit', as it uses 'roundToTick' in a tight loop (#trades * #tick-units calls). Also unqualify 'TradesChartsViewModel.TickUnit' references for brevity. |
||
---|---|---|
.. | ||
main | ||
test |