Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improves system performance in a few ways:
FieldLayout::getCustomFields()
now memoizes the results. (Only applies when returning all custom fields; not just visible ones based on conditions.)ArrayHelper::index()
withinElementQuery::_loopInCustomFields()
due to high call count.Field::getValueSql()
now memoizes the result, based on the$key
passed in.withCustomFields
element query param, which can be set tofalse
to omit custom fields from the query’s params and resulting elements. Useful for high-frequency queries that don’t need to factor in custom fields, like getting each element’s total descendants on a Structure section’s index.trigger()
call in a$this->hasEventHandlers()
/Event::hasHandlers()
condition, reducing unnecessary event object instantiations.