? ? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
2 Jan 2018

Summary of Changes

Faster loading of category items in component content view categories.
Instead of using a query with GROUP BY this PR uses DEPENDENT SUBQUERY.

Testing Instructions

Joomla works as before.

On large content sites, categories view in component content loads faster.

Test on index.php/component/content/categories.
Enable debug mode.
Look for the query that contains c.id, c.asset_id, c.access, c.alias, c.checked_out, c.checked_out_time and numitems.

Expected result

Categories load faster on view categories.

avatar csthomas csthomas - open - 2 Jan 2018
avatar csthomas csthomas - change - 2 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jan 2018
Category Libraries
avatar csthomas csthomas - change - 2 Jan 2018
Labels Added: ?
avatar Folamour
Folamour - comment - 3 Jan 2018

Does this can help us on joomla 3.8.X timeload ? it seem to be for category view but that impact com_content, so i'm ready to test everything you can ask

avatar csthomas
csthomas - comment - 3 Jan 2018

I have read your issue and this PR is probably not directly related to your problem.
It will speed up com_content categories view.

This PR required 2 successful test to be ready to commit.

I have plan to fix your issue too, please test this one. It will help me to move forward faster.

avatar Folamour
Folamour - comment - 3 Jan 2018

Hi csthomas, i will try to manage to test this fix too, i'm currently experiencing trouble with PhpmyAdmin on last Xampp release, so i will need a bit of time to workaround that issue, when this will be done, i'll test the patch, thank a lot to help us, we are ready to help at our best just ask us if anything is needed.

avatar alikon
alikon - comment - 4 Jan 2018

from a quick test on postgresql with 100 cats the query plan seems better but the performance gain are neglibile,
@csthomas with how many categories do you have measured a sensible gain ?

avatar csthomas
csthomas - comment - 4 Jan 2018

I created 400 categories and 4000 articles by modified version of sampledata blog plugin, ex https://gist.github.com/csthomas/df973e13245e6a23ed5f8cb9ecd67ce1

avatar csthomas
csthomas - comment - 4 Jan 2018

In general, if there are more articles, the difference in speed should be more visible.

Total articles should be more than 4000.

avatar alikon
alikon - comment - 4 Jan 2018

well i've tested with 16000 articles with 100 category, but maybe is better to test on mysql should be most impacted cause different implementation on subquery

avatar csthomas
csthomas - comment - 4 Jan 2018

@alikon Did you go to /component/content/categories and look for query with COUNT().
There should be difference. I will show my screen shots.

avatar alikon
alikon - comment - 4 Jan 2018

i've tested this url http://localhost/test/index.php/component/content/categories only
i'll test on mysql when com_overload finish the job....

avatar alikon
alikon - comment - 4 Jan 2018

as suspected on mysql:

before patch

screenshot from 2018-01-04 21-02-23

after patch

screenshot from 2018-01-04 21-03-16

avatar alikon alikon - test_item - 4 Jan 2018 - Not tested
avatar alikon alikon - test_item - 4 Jan 2018 - Tested successfully
avatar alikon
alikon - comment - 4 Jan 2018

I have tested this item successfully on 63b1a4a


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

avatar alikon
alikon - comment - 4 Jan 2018

i've tested on MySQLi 5.7.20 not sure if in lower version the gain will be the same

avatar csthomas
csthomas - comment - 4 Jan 2018

My screen shots are similar, so I do not send them.

In general Mysql has a little problem with GROUP BY when there is a lots of columns (in SELECT).

avatar csthomas
csthomas - comment - 4 Jan 2018

The similar improvement I added at #19284. Instead of DISTINCT I use join to subquery.

avatar Quy Quy - test_item - 5 Jan 2018 - Tested successfully
avatar Quy
Quy - comment - 5 Jan 2018

I have tested this item successfully on 9ab2931


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

avatar ggppdk
ggppdk - comment - 5 Jan 2018

MariaDB to 10.1.29 on SSD

11,000 articles in a single category
80 categories created ...

Before this PR
1st run 6.1 seconds
2nd run 3.7 seconds

After this PR is applied
1st run 2.8 seconds
2nd run 0.6 seconds

avatar csthomas
csthomas - comment - 5 Jan 2018

Thank you folks for testing.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Jan 2018

@ggppdk can you please mark your Test as succcessfully?

avatar Folamour
Folamour - comment - 5 Jan 2018

I have granted an FTP access to ggpdk to download the akeeba archive as he seem to have issue with backup using http, i would like also to thanks you all for your time and effort to get the best CMS

f.

avatar csthomas
csthomas - comment - 10 Jan 2018

@ggppdk or @alikon Can you guys mark it as success?

The last commit, after @alikon tested, only removed alias from column. Code review will be enough.

avatar alikon alikon - test_item - 10 Jan 2018 - Tested successfully
avatar alikon
alikon - comment - 10 Jan 2018

I have tested this item successfully on 9ab2931


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

avatar Quy Quy - change - 10 Jan 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 10 Jan 2018

RTC


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

avatar mbabker mbabker - change - 15 Jan 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-01-15 15:04:52
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 15 Jan 2018
avatar mbabker mbabker - merge - 15 Jan 2018
avatar Folamour
Folamour - comment - 30 Jan 2018

Yiannis seem busy so I update the thread he have applied PR 19261 and PR 19284 pagetime load went from 4.5sec in joomla 3.7.5 to 3.5 sec in Joomla 3.8.3 (9 sec without PR), and start display page is 2.4 sec, for user Pagespeed load is 1.7 sec !!!!!!!!!! so its a wonderdull success !!!!!, I wand to sincerelly thanks Csthomas for is fantastic work ! and of course Georgios (ggppdk) who offer me is help, and all the Joomla devs, if I can exprim myself on the internet its because I discovered Joomla 8 year ago, I want to thank you all. You have to know that there is a lot of people using your code, and you make our life better, joomla 3.8.4 update will be awesome for user, just take a look : https://www.crashdebug,fr navigate througth the site and found a page not in cache (using left menu, and navigation bar at the bottom) they are displayed quasi instantly, you made it guys !!!!! Joomla is now as fast as wordpress with 14k article !!!!

Thanks,

Guillaume

Add a Comment

Login with GitHub to post a comment