viabtc / viabtc_exchange_server

A trading engine with high-speed performance and real-time notification
MIT License
2.68k stars 1.48k forks source link

Marketprice high memory usage #189

Open ddengster opened 5 years ago

ddengster commented 5 years ago

Hi, For marketprice, load_market() does a HGETALL for all values when it does load_market_kline. We have up to 290k values for one of our markets with key "k:marketname:1m", and as you can guess it can take a long time to load. Is it possible to specify a range for the HGETALL call?

lawrence296 commented 5 years ago

You're right, load time can get long when data is huge. What I did was to purge "1m" data more than 3 months old.