Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will a large redux state affect my application's performance?

I am building a front end page builder ( SPA ) for wordpress with react and it supports other plugins as well!

If we were just going to provide support to our own modules, we could have easily made each module as a separate component but since it supports cross compatibility, there is no telling what the markup will be. So when a module is added, details about the module is sent to the short code end point through an ajax request and the appropriate markup is generated and returned to builder as a string!

Then the markup is stored in the state and rendered instantly through a dumb component!

My problem is Some markups are as big as 20k characters and there is no telling how many modules will a user add since its a page builder!! Although I am using immutable js to maintain my state, I am skeptical about the performance!!

Should I not worry or is there any other approach better than what we are following now? Any thoughts on this will be much appreciated!

Thanks a lot for your time folks!

like image 450
Ram Subramanian Avatar asked Jul 22 '16 05:07

Ram Subramanian


Video Answer


1 Answers

I have worked with DraftJS and rendering articles in React components. It is not a problem so far. Able to hold large articles in redux state. Facebook, though it does not use Redux, uses DraftJS internally and the feed usually is heavily loaded with content.

like image 183
vijayst Avatar answered Oct 22 '22 22:10

vijayst