Skip to content

Conversation

@Denitz
Copy link
Contributor

@Denitz Denitz commented Apr 17, 2025

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 $extension key like plg_finder_content to 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

SELECT `name`,`element`
FROM `jos_extensions`
WHERE `type` = 'plugin' AND `folder` = 'finder' AND `enabled` = 1

Expected result AFTER applying this Pull Request

All views and module work as usual, no extra database query

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

@Denitz Denitz changed the title Optimize load of smart search plugins language [5.3] Optimize load of smart search plugins language Apr 17, 2025
@ceford
Copy link
Contributor

ceford commented May 26, 2025

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.

@Denitz
Copy link
Contributor Author

Denitz commented Jun 2, 2025

@ceford I can't confirm extra queries. Retested the patch and only see minus one query.

@ceford
Copy link
Contributor

ceford commented Jun 2, 2025

I have tested this item ✅ successfully on 38ef38b

I have rebuilt my test sites and tested this on the current 5 and 6 dev branches. I see the query disappear and I see no problems.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45345.

@QuyTon
Copy link
Contributor

QuyTon commented Jun 4, 2025

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.

@QuyTon QuyTon removed the Performance label Jun 4, 2025
@QuyTon
Copy link
Contributor

QuyTon commented Jun 4, 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45345.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 4, 2025
@laoneo laoneo merged commit 3b8c49e into joomla:5.3-dev Jun 16, 2025
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 16, 2025
@laoneo
Copy link
Member

laoneo commented Jun 16, 2025

Thanks!

@laoneo laoneo added this to the Joomla! 5.3.2 milestone Jun 16, 2025
@Denitz Denitz mentioned this pull request Jul 11, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants