User tests: Successful: Unsuccessful:
Load language associations for multiple articles and categories in a single query per each ArticlesModel::getItems()
call.
These methods now can accept array of IDs and return results grouped by ID in this case.
If a single int
is provided as ID, the results are returned as they were before, full BC.
CategoriesHelper::getAssociations()
CategoryAssociationHelper::getCategoryAssociations()
AssociationHelper::getAssociations()
Associations::getAssociations
Also, CategoriesHelper::getAssociations()
is optimized and an extra query for each loaded category is removed by using $advClause
param of Associations::getAssociations()
.
ArticlesModel::getItems()
now collects the article IDs to load the assocations for, next loads all associations in the single query.
Similar to I have already done with tags load.
37 queries in total, see a separate SQL query for each displayed article, like:
SELECT `c2`.`language`,CONCAT_WS(':', `c2`.`id`, `c2`.`alias`) AS `id`,CONCAT_WS(':', `ca`.`id`, `ca`.`alias`) AS `catid`
FROM `jos_content` AS `c`
INNER JOIN `jos_associations` AS `a` ON `a`.`id` = `c`.`id` AND `a`.`context` = :context
INNER JOIN `jos_associations` AS `a2` ON `a`.`key` = `a2`.`key`
INNER JOIN `jos_content` AS `c2` ON `a2`.`id` = `c2`.`id`
INNER JOIN `jos_categories` AS `ca` ON `c2`.`catid` = `ca`.`id` AND `ca`.`extension` = :extension2
...
34 queries in total, see a single query per each ArticlesModel::getItems()
call.
A new single query is like:
SELECT `c2`.`language`,`c`.`id` AS `pk`,CONCAT_WS(':', `c2`.`id`, `c2`.`alias`) AS `id`,CONCAT_WS(':', `ca`.`id`, `ca`.`alias`) AS `catid`
FROM `jos_content` AS `c`
INNER JOIN `jos_associations` AS `a` ON `a`.`id` = `c`.`id` AND `a`.`context` = :context
INNER JOIN `jos_associations` AS `a2` ON `a`.`key` = `a2`.`key`
INNER JOIN `jos_content` AS `c2` ON `a2`.`id` = `c2`.`id`
INNER JOIN `jos_categories` AS `ca` ON `c2`.`catid` = `ca`.`id` AND `ca`.`extension` = :extension2
...
No documentation changes for docs.joomla.org needed
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_categories Front End com_content Libraries |
@richard67 Sorry, rebased.
Thanks.
Build | 4.2-dev | ⇒ | 4.3-dev |
Labels |
Added:
PR-4.3-dev
|
This pull request has been automatically rebased to 5.0-dev. No new features will be merged into Joomla! 4.3 series. Joomla! 4.4 series is a bridge release to make migration from Joomla! 4 to 5 as smooth as possible.
Labels |
Added:
Feature
PR-5.0-dev
Removed: PR-4.3-dev |
This does not work for me - perhaps I have misunderstood the instructions. I selected the testing data All Frontend Views / Content Component / Article Category List. The debug queries show there are 10 Select calls as shown above both with and without the patch applied (my list length). With the patch applied there are 50 queries in total, without the patch there are 49.
I have tested this item ✅ successfully on f8faf01
I left my Testing data installed before installing Multilingual Sample data. Using a Category Blog for the Language specific articles I saw the query count go down from 47 to 43. There were no problems switching language or accessing the already installed English only menu items.
@Denitz Could you fix the scss-cs error reported by Drone here? https://ci.joomla.org/joomla/joomla-cms/70244/1/16
build/media_source/templates/administrator/atum/scss/blocks/_quickicons.scss
133:11 ✖ Expected nesting depth to be no more than 4 max-nesting-depth
Thanks in advance.
Category | Administration com_categories Front End com_content Libraries | ⇒ | Administration com_categories Repository NPM Change Front End com_content Libraries |
@richard67 It's strange because I didn't modify this file. Anyway, I've updated the current version from current 5.0-dev
Category | Administration com_categories Front End com_content Libraries Repository NPM Change | ⇒ | Administration com_categories Front End com_content Libraries |
Labels |
Added:
NPM Resource Changed
|
Title |
|
This pull request has been automatically rebased to 5.1-dev.
Title |
|
I have tested this item ✅ successfully on 292a79c
Labels |
Added:
PR-5.1-dev
Removed: NPM Resource Changed |
Tested successfully
Tested successfully
@Nuyonuyonoina Please submit your result in the issue tracker https://issues.joomla.org/tracker/joomla-cms/39189 by using the blue "Test this" button, otherwise it is not counted. Just a comment is not sufficient.
This pull request has been automatically rebased to 5.2-dev.
Title |
|
@fgsw @Nuyonuyonoina Can you test this again?
This pull request has been automatically rebased to 5.3-dev.
Title |
|
I have tested this item ✅ successfully on ee1851d
I don't see it as a bug fix but as an improvement, so it should be made for the 4.3-dev branch and not the 4.2-dev branch.