Skip to content
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

[Documentation] Missing reference to contentful-utilities #102

Open
Basca opened this issue Nov 30, 2020 · 2 comments
Open

[Documentation] Missing reference to contentful-utilities #102

Basca opened this issue Nov 30, 2020 · 2 comments

Comments

@Basca
Copy link

Basca commented Nov 30, 2020

Situation

Dealing with large data sets that need to be synchronised before loading the rest of the app.
Caused me to look into possibilities to ship my app with a seeded JSON.

I quickly found seedDBFromJSONFiles

But it was really difficult to find how to create a seed from a space.

Using google and searching the website you get directed to:
https://github.com/contentful/contentful-cli

However you specifically need:
https://github.com/contentful/contentful-utilities.swift

Which I could only find because I found:
https://github.com/contentful/contentful-persistence.swift/blob/master/Tests/ContentfulPersistenceTests/PreseedingTests.swift#L17

Suggestion

Update documentation, readMe and/or website tutorial, to make people aware of contentful-utilities

@mgratzer
Copy link
Contributor

@Basca, just saw your issue accidentally and you might be interested in our approach because we are seeding all content data with our apps as well.

Our approach is not to solve this via bundled JSON because the slowest part of this library is decoding and resolving relationships, this would impact the time until content can be shown drastically.

Instead, there is a separate process at build time that syncs all the data in the simulator. Then we copy the Core Data SQLite files into the app bundle and move them on startup. Then we go ahead with incremental syncs.

@Basca
Copy link
Author

Basca commented Dec 11, 2020

Thank you for sharing your solution, for us the small pagination of the downloads was the biggest hurdle.
By using 0.17.1 and up, it's possible to increase that limit.

When I provided the seedDB files functionality I could see the decoding part was within a second.
While the whole process with the small pagination could take over a minute.
Using the 0.17.1 we were able to reduce the load times to under 5 minutes without using seedDB.

Of course the duration depends on the complexity of your models and relationships, but I know Contentful team is working hard to improve that and have already made some great progress.

So this issue is purely to have a reminder to the Contentful team to update their documentation, combined with my other reported issue. It could benefit a lot of people and it's a shame if nobody uses the tooling they put so much time and effort into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants