-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fix unneeded repetitive filesystem access / checks (e.g. 10,000 in category view) causing performance issue in custom fields feature #17893
Conversation
// Return the data | ||
return $types; | ||
// Add to cache and return the data | ||
return $types_cache[$this->_type . $this->_name] = $types; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split this into 2 lines? I REALLY dislike assignments in return- or if-statements.
I have tested this item ✅ successfully on a88108d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17893. |
I have tested this item ✅ successfully on 6d59695 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17893. |
1 similar comment
I have tested this item ✅ successfully on 6d59695 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17893. |
RTC after two successful tests. |
Thank you! |
Pull Request for Issue #17889
This should fix a considerable part of the performance problem reported in #17889
e.g. 25% or 50% or 75% (please note that i have not tested the performance improvement)
Also the above performance improvement is when having --zero-- textareas / editor fields, since these also include a different performance issue which is that of triggering content plugins, in which case you have performance that depends on slow content plugins !!!
Summary of Changes
If you have 10 or more fields per record (e.g. per article)
Then the layouts of fields are checked several thousands of times (in category view) if they exist
and a few hundrends of times in single record view
With this PR every layou is checked only once
Testing Instructions
Custom fields display in frontend works as before
Expected result
The layouts of fields are checked only once if they exist
Actual result
The layouts of fields are checked several thousands of time if they exist
Documentation Changes Required
None