How to initialise a provider that has a heavy computation of the main thread? #4177
Unanswered
PritamSangani
asked this question in
Q&A
Replies: 1 comment
-
move your heavy calculation logic to top level function and you can use Isolate to run the function without janking UI. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a provider that has a heavy computation that takes a few seconds to complete. When I first read the provider, the initialisation blocks the main thread and so the loading spinner I have whilst the provider is in loading state experiences jank. Is there any way around this?
I have heard isolates is not supported by Riverpod because the provider scope would be different across isolates. Is this true? Are there any other ways around this issue?
Beta Was this translation helpful? Give feedback.
All reactions