Skip to content

Commit ddadaed

Browse files
author
Ariel Silahian
committed
small performance fixes
1 parent 0e7ad90 commit ddadaed

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

VisualHFT.Commons/Helpers/CachedCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void Update(IEnumerable<T> newData)
3333
{
3434
lock (_lock)
3535
{
36-
_internalList = newData.ToList();
36+
_internalList = new List<T>(newData);
3737
_cachedReadOnlyCollection = null; // Invalidate the cache
3838
}
3939
}

VisualHFT.Commons/Model/OrderBook.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ public object Clone()
197197
ProviderName = ProviderName,
198198
Symbol = Symbol,
199199
SymbolMultiplier = SymbolMultiplier,
200+
ImbalanceValue = ImbalanceValue,
201+
ProviderStatus = ProviderStatus,
200202
};
201203
clone.LoadData(Asks, Bids);
202204
return clone;

0 commit comments

Comments
 (0)