chimp1984
8a4d1cb6db
Return CompletableFuture once applyData is completed with all
...
calls.
2021-11-09 20:00:34 +01:00
chimp1984
a00667bbc2
Clean up log
2021-11-09 20:00:34 +01:00
chimp1984
67741f0d0e
Add DEFAULT_LOG_LEVEL field
2021-11-09 20:00:34 +01:00
chimp1984
cf9e49134a
Add shutDown method to ClockWatcher and shut it down at shutdown
2021-11-09 20:00:34 +01:00
chimp1984
b61d64e1ea
Add mapToUserThread method to ChartView
...
For initial rendering we need to delay a bit and wait
until async calls are completed.
2021-11-09 20:00:34 +01:00
chimp1984
a4b106cd4a
Apply async handling to DaoChartView as well
2021-11-09 20:00:34 +01:00
chimp1984
6b89bf0da9
Use async methods with CompletableFuture in viewmodel to
...
avoid that slow operations in data model are running on UI thread
2021-11-09 20:00:34 +01:00
Christoph Atteneder
07f4074d0c
Merge pull request #5794 from chimp1984/optimize-trade-chart-view-6
...
Optimize trade chart view [6]
2021-11-09 19:46:25 +01:00
chimp1984
c209da7c66
Fix package statement
2021-11-09 19:32:44 +01:00
chimp1984
a659a78db6
Do sorting on non UI thread as its slow and only attach
...
it to table in UI thread afterwards.
Chain updateSelectedTradeStatistics and updateChartData calls.
2021-11-09 19:20:35 +01:00
chimp1984
ce8a91fdb3
Make getUpdateChartResult ansync
2021-11-09 19:20:35 +01:00
chimp1984
041b07e2e1
Move getUpdateChartResult, getCandleData, getTimeFromTickIndex to ChartCalculations
...
Make maxTicks static and rename to MAX_TICKS
2021-11-09 19:20:35 +01:00
chimp1984
7ad5993aad
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
2021-11-09 19:20:35 +01:00
chimp1984
65706e7c14
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
2021-11-09 19:20:35 +01:00
chimp1984
603e9fde17
Add CompletableFutureUtils
...
Convenience util for CompletableFuture.allOf method
2021-11-09 19:20:34 +01:00
chimp1984
ca145b0eb3
Add static method getTradeStatisticsForCurrency and
...
use it instead of updateSelectedTradeStatistics
(preparation for follow up commit)
2021-11-09 19:20:34 +01:00
chimp1984
0271af995b
Add modelReady property and let view fill list once model is ready
2021-11-09 19:20:34 +01:00
chimp1984
ea66a510dc
Make buildUsdPricesPerTickUnit async using CompletableFuture
2021-11-09 19:20:34 +01:00
chimp1984
deeb912f9b
Move buildUsdPricesPerTickUnit to ChartCalculations
2021-11-09 19:20:34 +01:00
chimp1984
c51060a6d4
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)
2021-11-09 19:20:33 +01:00
Christoph Atteneder
dc0c1771f7
Merge pull request #5815 from ripcurlx/fix-git-ls-pointers
...
Fix Git LFS pointers
2021-11-09 19:13:00 +01:00
Christoph Atteneder
c3bb0162d6
Fix Git LFS pointers
2021-11-09 19:03:01 +01:00
Christoph Atteneder
7b6f971acd
Merge pull request #5790 from chimp1984/extract-persistence-of-blocks
...
Extract persistence of BSQ blocks out of DaoStateStore [5]
2021-11-09 18:31:07 +01:00
chimp1984
87f4444210
Add git lfs support for BsqBlocks in resources
...
Fix typo
2021-11-09 17:22:35 +01:00
ghubstan
4f1899265f
Fix conflicts from previous master/merge
2021-11-09 09:48:33 -03:00
ghubstan
20cc085dc8
Merge branch 'master' into 02-cli-console-formatting-api
2021-11-09 09:20:06 -03:00
chimp1984
1108e98164
Add isEmpty check
2021-11-09 13:01:21 +01:00
chimp1984
c600259267
Fix typo
2021-11-09 13:01:21 +01:00
chimp1984
97e356c79f
Add check that height of last block matches chainHeight from daoState
2021-11-09 13:01:21 +01:00
chimp1984
80e7c452ca
Add BsqBlocks resources and update DaoState
...
Add BsqBlocks resources
2021-11-09 13:01:20 +01:00
chimp1984
62b3e51b22
Cleanups, change log levels
2021-11-09 13:01:19 +01:00
chimp1984
3487932f6e
Remove unnecessary sorting
...
Blocks are always sorted by block height
2021-11-09 13:01:19 +01:00
chimp1984
a3fbdf48d2
Improve log
2021-11-09 13:01:19 +01:00
chimp1984
7c32587453
Persist bsq blocks as buckets of 1000 blocks
...
Improve logging
Add BsqBlockStore to protobuf
Remove DaoStateMonitoringService field
Do not persist the blocks in daoState anymore.
This improves persistence performance and reduces memory
requirements for snapshots.
2021-11-09 13:01:19 +01:00
chimp1984
699048634b
Avoid unnecessary serialisation/deserialisation cycle
...
For the snapshot we create a deep clone by protobuf serialisation.
We do not need the deserialisation back to the java object as it is
only kept in memory for later persistence where we need to do protobuf
serialisation again. So we can skip that cycle and safe a bit of
time at creating and persisting snapshots.
2021-11-09 13:01:19 +01:00
chimp1984
b619afa83d
Remove unused field
2021-11-09 13:01:18 +01:00
chimp1984
4d2d0717b5
Add getBlockTimeAtBlockHeight method
...
Improve getBlockStartDateByCycleIndex method
2021-11-09 13:01:18 +01:00
chimp1984
779bd0cf1e
Remove blockHashes set from daoState
...
Was only used from one use case which can be done differently.
2021-11-09 13:01:18 +01:00
Christoph Atteneder
65c308f5ed
Merge pull request #5782 from chimp1984/redesign-dao-state-monitoring
...
Redesign dao state monitoring [4]
2021-11-09 12:12:22 +01:00
chimp1984
7e1696b095
Fix typos, cleanups
2021-11-08 21:49:08 +01:00
Christoph Atteneder
00d7913bc6
Merge pull request #5055 from Jakub-CZ/button-buy-bsq
...
Add "Buy BSQ" button next to trade fee selector
2021-11-08 11:13:52 +01:00
Christoph Atteneder
07e224e40a
Simplify containers and improve truncation behavior
2021-11-08 11:06:00 +01:00
Christoph Atteneder
2b90633263
Improve naming of helper method
2021-11-08 11:05:27 +01:00
jmacxx
cea4fb30a2
Fix calculation & display of Locked Funds
2021-11-07 21:24:59 -06:00
ghubstan
3f61375622
Remove white space
2021-11-07 14:19:38 -03:00
ghubstan
eb57b7e75e
Merge branch '01-use-default-bsq-swap-acct' into 02-cli-console-formatting-api
2021-11-07 14:04:13 -03:00
ghubstan
1d403e7a42
Add CLI test dependency to check console output diffs, and tests
2021-11-07 14:01:36 -03:00
ghubstan
ec09d39832
Adjust apitest cases to new CLI console output api
2021-11-07 14:00:52 -03:00
ghubstan
0341104823
Adjust CLI classes to new console output api
2021-11-07 13:59:58 -03:00
ghubstan
08d16e6040
Deprecate old CLI console output formatters
...
A minor refactoring of some deprecated classes is included.
2021-11-07 13:51:27 -03:00