优化: 共用一次 store.GetAll() 快照,消除每 tick 两次 map 分配
This commit is contained in:
@@ -179,12 +179,12 @@ func main() {
|
||||
t1 := time.Now()
|
||||
|
||||
// Scan for arbitrage entries using maker fees (limit orders)
|
||||
makerOpps := ScanBGHL(store)
|
||||
snap := store.GetAll()
|
||||
makerOpps := ScanBGHL(snap)
|
||||
dashboard.UpdateScan(makerOpps)
|
||||
t2 := time.Now()
|
||||
|
||||
// Track spread window durations (how long each opportunity stays alive)
|
||||
snap := store.GetAll()
|
||||
spreadTracker.Tick(snap, cfg.TradeThreshold)
|
||||
|
||||
for _, opp := range makerOpps {
|
||||
|
||||
Reference in New Issue
Block a user