Skip to content

Listeners performance #3274

Answered by markerikson
donaldosebas asked this question in Q&A
Discussion options

You must be logged in to vote

The listener middleware runs one check per listener per action dispatched. Typically, that should be a pretty simple comparison, like action.type === 'some/action/string'. That's cheap.

If you have many listeners and dispatch many actions frequently, then the cost can add up over time, but mostly in the sense that "running more code takes longer than running less code".

Realistically, though, it's not going to be an issue.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@donaldosebas
Comment options

Answer selected by donaldosebas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants