statamic-rad-pack / runway

Eloquently manage your database models in Statamic.
https://statamic.com/runway
MIT License
107 stars 43 forks source link

[6.x] Improve augmentation of relationships #435

Closed duncanmcclean closed 4 months ago

duncanmcclean commented 4 months ago

This pull request refactors how Eloquent Relationships are augmented to improve performance and prevent as many duplicate queries, like seen in #430.

Changes include:

Testing

On my local sandbox, I managed to reduce the number of total queries for index pages (which use the {{ runway }} tag) down from a couple hundred to 3 queries.

Then, in the demo site provided in #430, I've managed to get rid of the duplicate queries & reduce the total number of queries down to 108, which is more reasonable than a couple thousand.


Closes #430.

github-actions[bot] commented 4 months ago

Released as part of v6.2.0.