PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar Denitz
Denitz
17 Apr 2025

Summary of Changes

Smart Search module creates new Query and triggers Joomla\Component\Finder\Administrator\Indexer::processString() method which loads available taxonomy branch titles via separate SQL query per each module (duplicate query).

We should not process empty string, when the module is loaded without any input. Plus, Taxonomy::getBranchTitles() load should use static cache and produce only single query to prevent duplicate when we have multiple mod_finder instances (i.e. typical case for Yootheme templates where one module is rendered in header and second in mobile dialog).

Testing Instructions

Create two Smart Search modules, apply patch,

Actual result BEFORE applying this Pull Request

Load page with Smart Search modules, see duplicate queries like:

SELECT `title`
FROM `jos_finder_taxonomy`
WHERE `parent_id` = 1 AND `state` = 1 AND `access` IN (1,5)

Expected result AFTER applying this Pull Request

No useless queries, the mod_finder render time is also faster now.

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar Denitz Denitz - open - 17 Apr 2025
avatar Denitz Denitz - change - 17 Apr 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Apr 2025
Category Administration com_finder
avatar Denitz Denitz - change - 17 Apr 2025
Labels Added: PR-5.3-dev
avatar Denitz Denitz - change - 17 Apr 2025
Title
Optimize smart search module
[5.3] Optimize smart search module
avatar Denitz Denitz - edited - 17 Apr 2025
avatar ceford ceford - test_item - 26 May 2025 - Tested successfully
avatar ceford
ceford - comment - 26 May 2025

I have tested this item ✅ successfully on 7826570

I see the number of queries decrease by 2 on both the pages with two modules and the results page with a side module. No problems observed.


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

Add a Comment

Login with GitHub to post a comment