sc-codec-min-bin icon indicating copy to clipboard operation
sc-codec-min-bin copied to clipboard

memory leak when using this codec

Open seiyria opened this issue 6 years ago • 3 comments

relevant packages:

    "sc-codec-min-bin": "^3.0.0",
    "socketcluster": "^14.3.2",
    "socketcluster-client": "^14.2.1",

With this turned on, my application gets a big memory leak - up to 4GB browser tab memory usage in chrome. Turning it off brings it down to the normal 130k that it was using before. It seems to hold onto strings erroneously. A bit of the heap snapshot before fixing looks like so:

image

seiyria avatar Sep 08 '19 23:09 seiyria

This module is a thin wrapper around https://github.com/kawanet/msgpack-lite - The functions are mostly stateless so it's hard to see how it would cause the problem unless it's an issue inside msgpack-lite itself. Were you able to learn more about this issue?

jondubois avatar Jun 01 '22 21:06 jondubois

It's unfortunately been a few years. I think my project still uses SC but I haven't worked on it in a long time. Sorry about that!

seiyria avatar Jun 01 '22 22:06 seiyria

@seiyria No problem. I should have seen this sooner. I missed the notification.

jondubois avatar Jun 01 '22 22:06 jondubois