-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More flexibility with syncPageSize on DataStore #7310
Comments
I agree to this. The other way around (while down-syncing), if I cross the 1Mb limit, the Datastore initialization fails silently and my app halts. ("ready" never fires). In the best of words, Datastore should catch this issue, dynamically lower the syncPageSize so that the initial Datastore sync finishes. At least I would like an "error" Event if "ready" is not an option... |
Per model configuration itself would be nice. |
This would be nice. A per model syncPageSize would be beneficial to speeding up our app while preventing failures due to crossing the 1MB app sync limit. Dynamic would be even better where I don't have to think about it at all, but this would be a good compromise. |
+1 for per model |
Agreed. By the way, what is the default syncPageSize if you don't provide a custom one? |
We experienced this today after pushing out a data update. We have one model that is significantly larger than the others due to its denormalized nature and number of records in that table. We only have about 100 records in that table so, tuning down Therefore it would be great to tune down |
This is very required feature. Once you have a model with nested data that can grow substantially for a particular model it should be possible to treat it differently. I would suggest making |
Is your feature request related to a problem? Please describe.
I'm using DataStore with 30 models. I have several models that contain a lot of information on many records (e.g. 25 variables and 10.000 records). But I also have a lot of models that contain very few information on many records (e.g. 4 variables on 10.000 records).
When syncing to the cloud, I get the following error: "ErrorType: Mapping template", "Message": "Transformation too large".
This indicates me that one of the syncing queries exceeded the 1MB limit provided by appsync.
The actual solution for this, is to reduce the syncPageSize of DataStore so that the syncing queries, fetch less data and thus have less chance to exceed that limit. This means that instead of fetching my records 1000 by 1000, I need to fetch them now 100 by 100.
This works, but it has a major performance drawback. Because of one or two tables making this limit being exceeded. I now have to fetch items 100 by 100 on every table, even on those with very few variables where queries 1000 by 1000 work perfectly fine.
Describe the solution you'd like
A solution would be to be able to configure the syncPageSize model by model instead of one value for all models. This would allow people like me, to set the limit to 1000 for tables with few information and to reduce it to 100 for high information tables.
Describe alternatives you've considered
Other possibilities but much more difficult to implement
The text was updated successfully, but these errors were encountered: