Reputation: 1282
In Cordova app, fire and fogret effect is implemented like this:
@Effect({dispatch: false})
onFireAndForget$ = this.actions$
ofType(MyActionTypes.FireAndForget)
.pipe(
tap(action => longRunningMethod(action.payload))
)
UI of application freezes until execution of "longRunningMethod" finished. Is there any way to execute long running method on separate thread to not affect other app processes?
Upvotes: 0
Views: 207
Reputation: 1282
It turned out, that problem is not in effect implementation neither in application. UI sloweness was experienced only during test Cordova app on device with inspecting it in chrome on PC. No problems, when run application normally.
Upvotes: 0