O'Reilly logo

Flux Architecture by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The cost of immutable data

By now you are well aware of the advantage immutable data brings to a Flux architecture—a level of assurance about our unidirectional data-flow. This safety net comes at a cost. In this section, we'll discuss how expensive immutability can be and what can be done about it.

We'll start by covering the biggest immutability issue—transient memory allocations and garbage collection. These things are big threats to the performance of our Flux architecture. Next, we'll think about lessening the amount of memory allocations by batching together transformations on immutable data. Finally, we'll think about the ways in which immutable data eliminates code that's only needed to handle scenarios where data is mutable.

Garbage collection ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required