-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
This may internally increase performance, but converting immutable.js to ordinary JS or JSON is very expensive. I am yet to see an application that doesn’t need to persist its state, which means to have to make this conversion. Operating on small data objects, which is often the case in apps, the difference between Ramda’s |
This would have to be a fork. You would not convert, you would expose the immutable API |
As an end-user, in an actual app, I would still have to convert from immutable.js to some data which can be persisted in the app’s infrastructure. Thus, making it quite expensive. |
What do you mean by persisted? Onionify is used to persist state. If you want to keep it after page reload, you will have a lot more explensive actions than converting some data (HTTP RTT) |
Persistence as in storing data in external storage, usually a DBMS. |
Many projects use Redux with Immutable.js and this usually works fine. |
So what? Now you have both the costs.
I can also avoid immutable.js ;) |
it depends on use case, really. |
As a closing note from me, we have a library that uses immutable.js, but now that we need to use it in an application that doesn’t use immutable.js, our adapter converts the data structure. When we inspect the application, we see that immutable.js is responsible for 67.5% of the memory consumption, in particular places where we see a slowdown. To see how immutable.js affects memory consumption: https://jsfiddle.net/sn70x2p6/ (yes, milage may vary, which is why I’m very concerned about libraries making use of immutable.js) |
@jvanbruegge Thanks! |
Yes, I thought about a fork, but thats not the best solution |
This should increase performance a lot, haven't tested it yet.
I just want to get a bit of feedback :)