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
I had some performance problems and tried out alwaysHydrate, awaitRemote and awaitRemoteWhenNoneExist. As expected awaitRemoteWhenNoneExist was the fastest policy. But alwaysHydrate seems to be slow like awaitRemote.
According to the doc
/// This hydration is unawaited and is not guaranteed to complete before results are returned.
/// This can be expensive to perform for some queries; see [awaitRemoteWhenNoneExist]
/// for a more performant option or [awaitRemote] to await the hydration before returning results.
If the hydration is not awaited then i don't understand why i don't get any speedup. I expected that the local results are returned fast and that i get the updated data with a small delays.
The text was updated successfully, but these errors were encountered:
After i looked in the code i have an idea where the bottleneck could be. The problem occurred only with models that have multiple associations. If i use alwaysHydrate then all associations and associations of associations are fetched with alwaysHydrate. In my case this is not required. I would like to use awaitRemoteWhenNoneExist for them. I would like to create a PR to add a parameter like policyForAssociations to the get and subscribe method.
I had some performance problems and tried out
alwaysHydrate
,awaitRemote
andawaitRemoteWhenNoneExist
. As expectedawaitRemoteWhenNoneExist
was the fastest policy. ButalwaysHydrate
seems to be slow like awaitRemote.According to the doc
If the hydration is not awaited then i don't understand why i don't get any speedup. I expected that the local results are returned fast and that i get the updated data with a small delays.
The text was updated successfully, but these errors were encountered: