mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-02 09:19:09 +08:00
e1b376a49b
Add a cap of 5 sliding windows (one per OHCLV column) to the history loader's cache of sliding windos. This prevents unbounded growth on algorithms that call history with a highly varied list of equities. To follow is splitting the cache up by column and by sid, so that the loader does not re-prefetch sids which have already been read with sufficient data; however this patch is enough to fix the issue where an algo with high rotation can add up a megabyte per day of memory on algorithms which rotate on a 5% dollar volume pipeline. With this cap those algorithms have more plateaus with regard to memory consumption. This patch requires new dependency of `cachetools` library.