mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-31 12:10:31 +08:00
Instead of letting the cache of carrays grow unbounded, use an LRUCache to cap the number of equities for any given column. Tested with the size 1000, on an algo that was using pipeline which was using over 3000, runtimes were similar, but the memory usage was successfully capped to around 1.2GB. Also, tested with an algorithm which bought and hold just one equity and no major slow down was seen when using the LRUCache vs. a dictionary. We may want to follow this up with an extension to `carray` which is not as memory hungry per column; e.g. by not loading repeated/similar metadata or releasing the last read chunk after a certain amount of time.