News for hackers. Stuff that matters.
Re:Application Architecture with React: Rethinking Flux by woah on Monday September 14, 2015 @01:28PM (#10216218)
I think you know this, but just so that nobody gets the wrong idea- the new object created only uses as much memory as the difference between the new object and the old one. Immutablejs keeps track of the diffs and presents an interface to something that acts like a whole new object but consists of the old object + diffs.

So if you are replacing some in-place array mutation with Immutablejs code, this will use slightly more memory. However, if you are replacing native .map, .reduce, or .filter code with the equivalent Immutablejs, you will actually use less memory, because the built in methods clone the entire object.

There are no comments on this comment yet.