You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Team!
I have a project using
toggl.komposable, but met some performance issue.
After debugging I found that it's because it takes too long for a Reducer to call reduce function when starting the App, think it's because
Ul thread is full occupied when the App is starting. And I found that MutableStateFlowStore force the reduce process run in dispatcherProvider.main
Is there a reason why? And if I just change the dispatcherProvider like below, to make it run in 10 thread, the problem solved.
internal val dispatcherProvider =
DispatcherProvider(
io = Dispatchers.io,
computation =
Dispatchers.Default,
main = Dispatchers.io,
)
But I don't know if it's risky, can you help please? Many thanks.
The text was updated successfully, but these errors were encountered:
The state updates need to be handled non-concurrently. The easy way to do this is to update all states on main (at the risk of UI hitches) but this is not required if your store dispatcher uses limitedParallelism(1). if you use Dispatchers.io for the store dispatch, you can introduce race conditions in your state updates due to parallelism and have hard to track down bugs.
Description
Hi Team!
I have a project using
toggl.komposable, but met some performance issue.
After debugging I found that it's because it takes too long for a
Reducer to call reduce function when starting the App, think it's because
Ul thread is full occupied when the App is starting. And I found that MutableStateFlowStore force the reduce process run in
dispatcherProvider.main
Is there a reason why? And if I just change the dispatcherProvider like below, to make it run in 10 thread, the problem solved.
But I don't know if it's risky, can you help please? Many thanks.
The text was updated successfully, but these errors were encountered: