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

Identifiying potential usecase for eager loading #68

Closed
maxime-rainville opened this issue Jun 22, 2023 · 1 comment
Closed

Identifiying potential usecase for eager loading #68

maxime-rainville opened this issue Jun 22, 2023 · 1 comment

Comments

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Jun 22, 2023

We've recently implemented eager loading for Silverstripe CMS.

There are some scenarios in Silverstripe CMS where this could be useful. We should aim to identify a few high value one where this could be used to improve the responsiveness of the CMS and to validate the implementation of eager leading.

Acceptance criteria

  • We've identified a few scenarios where we could try to use eager loading to speed up the CMS.
  • For each scenario, we should aim to quantify the number of queries saved for a typical CMS site
  • Cards are created as follow up.

Note

  • The obvious scenario here is for relations GraphQL queries. That was the original impetus to get this created.
  • There's likely somewhere this can be used either in the templating engine itself, or as a documented recommendation for when relations are used on the front-end
  • Bear in mind that there are limitations to our current eager loading implementation
    • can only go up to 3 relations deep
    • eager-loaded relation lists are ArrayList rather than a subclass of DataList so it can't be used in some scenarios, e.g. we can't alter many_many_extrafields data, and we can't add items to the relation by adding to the list

Related

@maxime-rainville
Copy link
Contributor Author

Probably miss our window of opportunity on this one.

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

No branches or pull requests

3 participants