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

[5.x] Blink augmentation of terms and entries fieldtypes #9938

Merged
merged 5 commits into from
Apr 22, 2024

Conversation

jasonvarga
Copy link
Member

This PR will use blink to prevent unnecessary re-querying on entries and terms fieldtypes when using max_items 1.

On one particular test site, a blog post template a handful of typical taxonomy related bits on the page loaded in about 1.3s. This PR gets it down to about 750ms.

src/Fieldtypes/Terms.php Outdated Show resolved Hide resolved
@ryanmitchell
Copy link
Contributor

What's the reasoning to not do it for multi-values too?

Currently if you have a multi-value entries field type on a page that you access more than once in a template then the query is run each time. If it was blinked, it would only be run once.

@jasonvarga
Copy link
Member Author

Multi-value gives you a query builder. Blinking it isn't gonna do much. It'll still resolve when you use it in templates.

@ryanmitchell
Copy link
Contributor

Gotcha, thanks for explaining. Hopefully the augmentation PR makes things less query heavy then.

@jasonvarga jasonvarga merged commit b708039 into master Apr 22, 2024
31 checks passed
@jasonvarga jasonvarga deleted the blink-augmenting-of-terms-and-entries-fieldtypes branch April 22, 2024 14:17
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

Successfully merging this pull request may close these issues.

3 participants