small changes to aid upcoming performance optimization #409
No reviewers
Labels
No labels
blocked
breaking
bug
dependencies
duplicate
enhancement
good first issue
help wanted
question
tech debt
testing
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
scion/arbitrader!409
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "perf-prep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
computeVolumeScale()andcomputePriceScale()to use a provided default value for added flexibilitycomputeVolumeScale()andcomputePriceScale()to avoid unnecessary object creationcomputeVolumeScale()andcomputePriceScale()to log when metadata is not available@ -420,2 +409,3 @@final int shortVolumeScale = computeVolumeScale(spread.getShortExchange(), currencyPairShortExchange);final int longVolumeScale = computeVolumeScale(spread.getLongExchange(), currencyPairLongExchange, SAFE_SCALE);final int shortVolumeScale = computeVolumeScale(spread.getShortExchange(), currencyPairShortExchange, SAFE_SCALE);What is the advantage of changing the scale from 8 (BTC_SCALE) to 1 (the defaultScale we pass in now)?
Are you aware this scale value will be used in
TradeVolumeand it's subclasses?Same question as above:
What is the advantage of changing the scale from 8 (BTC_SCALE) to 1 (the defaultScale we pass in now)?
@ -420,2 +409,3 @@final int shortVolumeScale = computeVolumeScale(spread.getShortExchange(), currencyPairShortExchange);final int longVolumeScale = computeVolumeScale(spread.getLongExchange(), currencyPairLongExchange, SAFE_SCALE);final int shortVolumeScale = computeVolumeScale(spread.getShortExchange(), currencyPairShortExchange, SAFE_SCALE);Not all coins accept 8 decimal places when placing orders, but almost all of them should accept 1 decimal place. The idea was to find a default that is the most compatible across all exchanges and all coins, and sacrificing some precision for compatibility seems worthwhile.
In a future PR I'm going to add configuration that you can use if your coin is defaulting because XChange doesn't have metadata for it but you want something other than 1.
I have several changes I’ve been working on and I think it’s best to break them up into several smaller PRs.