Closed jp-imx closed 1 year ago
I believe we are hitting a memory leak in fastjson discussed here: https://github.com/valyala/fastjson/issues/24
fastjson
This PR resets the fastjson.ArenaPool object after using it. It means we won't get cache hits across calls to MarshalJSON but given the cardinality of the data in blocks and transactions, I expect the impact to be minimal.
fastjson.ArenaPool
MarshalJSON
Happy to discuss if my assumption if incorrect.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
I believe we are hitting a memory leak in
fastjson
discussed here: https://github.com/valyala/fastjson/issues/24This PR resets the
fastjson.ArenaPool
object after using it. It means we won't get cache hits across calls toMarshalJSON
but given the cardinality of the data in blocks and transactions, I expect the impact to be minimal.Happy to discuss if my assumption if incorrect.