Open christopherwxyz opened 1 month ago
That function shouldn't run more than once per blob, of which there are 2.
Let me see if I can run this.
There's not enough information here for me to run this, can you provide steps?
I temporarily added an deinit()
function and called init(); deinit();
in a loop while observing process.memoryUsage()
and see no leak. IMO, it very unlikely that there is a leak at this level, as I'm only building dag-like structures with Set, Map, and primitives. I also took special care to avoid large spreads to avoid JS engine limitations.
However, this library does have a non-zero setup cost to decompress the full spec and build the appropriate structures. Is your project (or some part of it) using a short-lived worker?
Can you provide me a zip or the JS bundle of whatever code is actually being executed? Possibly the inline base64 blob is getting mangled during your build process? decode_arithmetic()
will certainty do something silly if the incoming data is non-sense (eg. zip-bomb equivalent expansion)
Currently using
@farcaster/shuttle
and experiencing a gnarly memory leak. I loaded up a heapdump and narrowed it down to a dynamically growing array or possibly a few variants.Steps to reproduce: