Closed stas closed 2 years ago
We're running multicall in a background worker and we could see an abnormal usage of the memory. After reviewing the implementation and switching to concurrent.futures.ThreadPoolExecutor, the processes stopped leaking memory.
multicall
concurrent.futures.ThreadPoolExecutor
Relevant line of code: https://github.com/banteg/multicall.py/blob/master/multicall/utils.py#L27
This was fixed in #44 .
Encoding/decoding now takes place serially, but multiprocessing can still be enabled via a "MULTICALL_PROCESSES" env var.
We're running
multicall
in a background worker and we could see an abnormal usage of the memory. After reviewing the implementation and switching toconcurrent.futures.ThreadPoolExecutor
, the processes stopped leaking memory.Relevant line of code: https://github.com/banteg/multicall.py/blob/master/multicall/utils.py#L27