Web socket performance issues in .Net libs

Hi everyone!

I’m having an issue regarding web socket performance.
My .Net client (written in .Net Core) is processing for 330 symbols for 5 intervals (15m, 30m, 1h, 4h, 1d)
In the first step, I used the GetKlinesAsync method to get KLine, 500 klines for each symbol.
var result = await _client.Spot.Market.GetKlinesAsync(symbol, interval, limit: 500, ct: _cancellationToken);
if (result.Success)
{
_kLineData[symbol][interval] = new ConcurrentQueue(result.Data);
}
Once all symbols’ kline were filled,
I’m subscribing to web socket to get kline update.
var result = await _socketClient.Spot.SubscribeToKlineUpdatesAsync(symbols, KLineIntervals, kLineData =>
{
Task.Run(async () => { await HandleKLineUpdate(kLineData.Data); });
});

I see there is a lot of memory was consumed, around 4G - 5G RAM. Have everyone faced the same problem? Or are there any issues with the Binance socket in cases like that?

Does anybody has any advice for me?
I am very appreciating for your help.

Kind regards,

with 330 symbols with 5 intervals, you are dealing with significant amount of data. It may require a lot of RAM in your side, please try to reduce the amount of symbols and see how is the usage.

Thank you @dino,
I will follow your idea to see what the issue is with memory.
Actually, 330 symbols are one part of my tool, in the next step, I’m going to scan to 1000 symbols