Redux-saga: Will forking too many watchers cause performance issues?

Created on 4 Jun 2016  路  1Comment  路  Source: redux-saga/redux-saga

Hi, in the site we're building, when the app is launched, we will fork all the action watcher at the same time, as follows:

function* watchBlabla1() {
  yield* takeLatest(action1, blaBla1);
}
function* watchBlabla2() {
  yield* takeLatest(action2, blaBla2);
}
function* watchAll() {
  yield [
    fork(watchBlabla1),
    fork(watchBlabla2),
    ...
  ]
}

Currently we already have a few dozens of these kind of watcher running at the same time, and we expect it to grow more and more. My question is that is it ok to do things this way, will it cause any performance issues?

question

>All comments

It depends on the use case, I dont think having many watchers will impact the perf. on most cases (unless it's a perf. critical app ).But you need to profile the app and measure the impact

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Beingbook picture Beingbook  路  3Comments

NullVoxPopuli picture NullVoxPopuli  路  3Comments

oliversisson picture oliversisson  路  3Comments

mpyw picture mpyw  路  3Comments

brunobelotti picture brunobelotti  路  3Comments