-
-
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
[5.2] Improve Multilanguage::getSiteHomePages() #41507
base: 5.2-dev
Are you sure you want to change the base?
Conversation
This pull request has been automatically rebased to 5.1-dev. |
I have tested this item ✅ successfully on 9ea35c7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41507. |
I have tested this item ✅ successfully on 9ea35c7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41507. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41507. |
This pull request has been automatically rebased to 5.2-dev. |
This was discussed at the maintainers meeting today. Please don't remove the parameter but make a depeciated message for the parameter so that we can remove it in one of the next versions. Beside this the change is approved. Thanks. |
@rdeutz Done. Note that I can't add @deprecated attribute because it deprecates the whole method. |
Summary of Changes
Joomla\CMS\Language\Multilanguage::getSiteHomePages()
uses an extra database query per each page load to discover the language-specific site homepages.We can easily eliminate this extra database query and use the native
SiteMenu::getItems()
.Testing Instructions
Test a website with enabled multilanguage functionality and Joomla system caching enabled.
Actual result BEFORE applying this Pull Request
See an extra unoptimized SQL query per each page load:
Expected result AFTER applying this Pull Request
No extra SQL query, the homepages are discovered from the cached menu items.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed