There are currently a lot of calls to the market data store to get the current market data snapshot for a given market and all markets. To prevent hammering postgres and incurring latency each time, cache the latest market data structs for each market.
There are currently a lot of calls to the market data store to get the current market data snapshot for a given market and all markets. To prevent hammering postgres and incurring latency each time, cache the latest market data structs for each market.