-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.3] Optimize load of smart search plugins language #45345
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
Conversation
|
With the patch applied I see that the quoted query disappears. However, in a page that has the query results and a query module I see the total number of queries increase! So, the patch is removing one query but creating more duplicates. Can you check and explain? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45345. |
|
@ceford I can't confirm extra queries. Retested the patch and only see minus one query. |
|
I have tested this item ✅ successfully on 38ef38b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45345. |
|
I have tested this item ✅ successfully on 38ef38b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45345. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45345. |
|
Thanks! |
Summary of Changes
Currently,
\Joomla\Component\Finder\Administrator\Helper\LanguageHelper::loadPluginLanguage()uses a database query to get list of available finder plugins and next loads their language files.This database query is useless because we can use native
PluginHelper::getPlugin('finder')method which provides additional benefit (no extra database query is executed).Additionally, the language load should be performed using system-wide
$extensionkey likeplg_finder_contentto prevent duplicate language file load.This method is called in all com_finder views plus mod_finder display, we can remove extra database and prevent duplicate language load.
Testing Instructions
Apply patch. Test smart search views in frontend, check smart search module display.
Actual result BEFORE applying this Pull Request
See extra database query like
Expected result AFTER applying this Pull Request
All views and module work as usual, no extra database query
Link to documentations