bisq/desktop
Steven Barclay 372f92d7aa
Add cache to speed up ChartCalculations.roundToTick
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.
2023-05-10 19:41:22 +01:00
..
package Revert to SNAPSHOT version 2023-04-15 11:59:46 +10:00
src Add cache to speed up ChartCalculations.roundToTick 2023-05-10 19:41:22 +01:00
build.gradle Gradle: Apply bisq.java-conventions to all projects 2023-02-05 22:02:13 +01:00