Skip to content

Redux Performance with Large Store and frequent updates #1303

@landabaso

Description

@landabaso

This is a question / ask for advice

Let's say you have a fairly large SPA with lots of state since there are many pages, panels, sub panels and lots of stuff.

Now imagine you design your App using reducer composition (at various levels) and have the Store pretty well organised so that it makes your life easier.

Now imagine that in one of the panels you get live events. For example, let's say you have a list of 100 items consisting of stock exchange values which are updated each one independently 1 time per second. (Please disregard the problem of the network and assume the values are randomly generated).

I believe React is the way to go since it will be smart and won't render when it is not necessary.

But I'm not sure how to make it work with Redux.

It's nice that I can use one Store and fetch all the stock values and store them individually triggering actions an so on and having a pretty nice Store with all the info very well organized.

But since I am getting very frequent updates, then all my reducers (which will be a lot) will have to be called. I know that the call will be very quick since most of the time I will only copy object pointers.

Anyway since my app is using composition so heavily then there will be many function calls. This can be bad specially on old mobile devices.

I'm designing one such app and I'm not sure how to make Redux fit in there (if possible). Perhaps you could give some valuable advice at this point (I just started working on it). Is it possible to use (somehow) different Stores each one connected only to different actions so that I minimize calls to reducers?

Any ideas?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions