immutable-js-oss / immutable-js

Immutable persistent data collections for Javascript which increase efficiency and simplicity.
https://immutable-js-oss.github.io/immutable-js/
MIT License
37 stars 6 forks source link

Equivalent ImmutableJS object seems to have high memory usage #166

Open Methuselah96 opened 4 years ago

Methuselah96 commented 4 years ago

From @NMagno on Tue, 17 Dec 2019 07:41:25 GMT

What happened

Creating a large list of small maps seems to have poor memory performance.

How to reproduce

JSfiddle demonstrating the issue. As you can see, the memory usage when making the equivalent list of small maps is significantly larger.

immutablememory

In this image, you see that Immutable is taking about 5x memory usage as the standard JS array.

Copied from original issue: https://github.com/immutable-js/immutable-js/issues/1754