? ? Pending

User tests: Successful: Unsuccessful:

avatar Denitz
Denitz
25 Feb 2022

Summary of Changes

Currently, frontend category models load tags separately per each item from the list of N items.
It results in N database queries.

The patch introduces new method Joomla\CMS\Helper\TagsHelper::getMultipleItemTags() which is executed only one time for all items and loads the tags of multiple items via one query.

Additionally, the patch has a simple code-cleanup and removes some deprecated JFactory calls.

Also declares the godforsaken Joomla\CMS\Helper\TagsHelper::$itemTags property.

Testing Instructions

Browse the frontend category views with tagged items for com_content, com_contact and com_newsfeeds.
Note the queries of pages.

Actual result BEFORE applying this Pull Request

Each item has its own separate query to load tags.

Expected result AFTER applying this Pull Request

All tags are loaded in a single query. See the number of queries is less by N-1.

Documentation Changes Required

No.

487bae7 25 Feb 2022 avatar Denitz start
feafdb9 25 Feb 2022 avatar Denitz fix
avatar Denitz Denitz - open - 25 Feb 2022
avatar Denitz Denitz - change - 25 Feb 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Feb 2022
Category Front End com_contact com_content com_newsfeeds Libraries
6c8e515 25 Feb 2022 avatar Denitz CS
avatar Denitz Denitz - change - 25 Feb 2022
Labels Added: ?
avatar chmst chmst - test_item - 26 Feb 2022 - Tested successfully
avatar chmst
chmst - comment - 26 Feb 2022

I have tested this item successfully on d04de31

Tested with com_content


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

avatar Denitz
Denitz - comment - 30 May 2022

@joomdonation All done, thanks!

avatar joomdonation
joomdonation - comment - 30 May 2022

Thanks @Denitz . I will re-test it later today and mark my test result.

avatar joomdonation joomdonation - test_item - 30 May 2022 - Tested successfully
avatar joomdonation
joomdonation - comment - 30 May 2022

I have tested this item successfully on de2d872

Works well. Thanks for working on this improvement.


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

avatar joomdonation
joomdonation - comment - 30 May 2022

@chmst Could you please re-test this PR ?

avatar viocassel viocassel - test_item - 31 May 2022 - Tested successfully
avatar viocassel
viocassel - comment - 31 May 2022

I have tested this item successfully on de2d872


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

avatar Quy Quy - change - 31 May 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 31 May 2022

RTC


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

avatar bembelimen
bembelimen - comment - 5 Jun 2022

Although I'm in favour of performance improvements, we should do it in 4.2.

I will rebase. Thanks for this PR!

avatar bembelimen bembelimen - change - 5 Jun 2022
Labels Added: ?
avatar richard67
richard67 - comment - 6 Jun 2022

@bembelimen Does it need new human tests, i.e. remove RTC, due to the rebase? I've restarted the failed drone and this time it succeeded.

avatar roland-d roland-d - change - 6 Jun 2022
Labels Added: ?
Removed: ?
avatar roland-d roland-d - change - 6 Jun 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-06 17:18:03
Closed_By roland-d
avatar roland-d roland-d - close - 6 Jun 2022
avatar roland-d roland-d - merge - 6 Jun 2022
avatar roland-d
roland-d - comment - 6 Jun 2022

Thanks everybody

Add a Comment

Login with GitHub to post a comment