Problem/Motivation
When field views data is being built, it individually loads fields per bundle to check if they're translatable, using direct config entity loads, then later on, loads all the bundle fields anyway via the entity field manager.
If we use the entity field manager consistently, it saves separate database queries, cache sets and gets on cold caches.
Steps to reproduce
NA
Proposed resolution
In FieldViewsDataProvider break out nested foreach loop.
Remaining tasks
User interface changes
NA
Introduced terminology
NA
API changes
NA
Data model changes
NA
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-3564973
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3564973-optimize-field-views
changes, plain diff MR !14180
Comments
Comment #3
catchComment #4
smustgrave commentedOkay tried my best with the visual review since not sure how to manually test it. Full disclosure leaning on the performance tests for this one.
That said looking at the changes in FieldViewsDataProvider and it makes sense to breakout the foreach loop.
Going to take a swing.
Comment #6
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #7
catchRebased.
Comment #8
alexpottCommitted af66597 and pushed to 11.x. Thanks!
Committed de026a4 and pushed to main. Thanks!