?
avatar SharkyKZ
SharkyKZ
15 Nov 2019

Steps to reproduce the issue

Create some categories.
View frontend pages that contain many links to categories.

Expected result

An OK number of queries.

Actual result

Too many duplicate queries.

Additional comments

Using the old JCategories::getInstance() method here eliminates duplicate queries:

$category = $this->categoryFactory->createCategory(['access' => true])->get($id);

avatar SharkyKZ SharkyKZ - open - 15 Nov 2019
avatar joomla-cms-bot joomla-cms-bot - change - 15 Nov 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Nov 2019
avatar wilsonge
wilsonge - comment - 15 Nov 2019

The problem is because CategoryNode is a mutable class (i.e. we can change the data in it without saving) it shouldn't be cached in certain cases. It's on of those super tricky things where there's no obviously correct answer :/

avatar SharkyKZ
SharkyKZ - comment - 19 Nov 2019

Frontend performance in J4 is really crap because of this ? .

avatar SharkyKZ SharkyKZ - change - 30 Jan 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-01-30 07:06:25
Closed_By SharkyKZ
avatar SharkyKZ SharkyKZ - close - 30 Jan 2020
avatar SharkyKZ
SharkyKZ - comment - 30 Jan 2020

See PR #27710 for adding caching to routers only .


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

Add a Comment

Login with GitHub to post a comment