[ ] Chore (a non-breaking change which is related to package maintenance)
[x] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
This PR improves performance during previews orchistrated by gatsby-plugin-prismic-previews. The performance improvement is negligible for relatively small repositories, but should be noticable to large repositories (>500 documents).
Note that this does not fundamentally change the way previews work; it will still fetch all documents in the repository to ensure near identical behavior to the Gatsby's native GraphQL API.
The changes in this PR remove extra computation that is not critical during client-side previews.
For more details, see #500.
(Thank you to @Baztoune for diagnosing the issue and finding a fix. Also, thank you to everyone who has reported the issue in #500 and shared their experience.)
Checklist:
[ ] My change requires an update to the official documentation.
[ ] All TSDoc comments are up-to-date and new ones have been added where necessary.
Package
Types of changes
Description
This PR improves performance during previews orchistrated by
gatsby-plugin-prismic-previews
. The performance improvement is negligible for relatively small repositories, but should be noticable to large repositories (>500 documents).Note that this does not fundamentally change the way previews work; it will still fetch all documents in the repository to ensure near identical behavior to the Gatsby's native GraphQL API.
The changes in this PR remove extra computation that is not critical during client-side previews.
For more details, see #500.
(Thank you to @Baztoune for diagnosing the issue and finding a fix. Also, thank you to everyone who has reported the issue in #500 and shared their experience.)
Checklist: