?
avatar ggppdk
ggppdk
2 Sep 2017

Steps to reproduce the issue

  1. Edit file:
    libraries/src/MVC/Controller/AdminController.php

  2. Find method saveOrderAjax()
    and comment out (so that we can use the DEBUG screen)
    \JFactory::getApplication()->close();

  3. Enable debug and visit URL:
    /administrator/index.php?option=com_categories&task=categories.saveOrderAjax

(also same problem with menu items)
/administrator/index.php?option=com_menus&task=items.saveOrderAjax

Expected result

1 SELECT query to the categories table
1 UPDATE query to the categories table

Actual result

For N e.g. 300 categories in the table (assuming almost all of them belong to the com_conent)
300 SELECTs on the table
300 UPDATEs on the table

Code is here:
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/MVC/Model/AdminModel.php#L1325-L1345

System information (as much as possible)

Additional comments

avatar ggppdk ggppdk - open - 2 Sep 2017
avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Sep 2017
avatar ggppdk ggppdk - change - 2 Sep 2017
Title
Bad performance of AdminModel saveOrder() 2*N queries for N records in DB table
Bad performance of AdminModel saveOrder()
avatar ggppdk ggppdk - edited - 2 Sep 2017
avatar ggppdk ggppdk - change - 2 Sep 2017
The description was changed
avatar ggppdk ggppdk - edited - 2 Sep 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Sep 2017
Category Administration com_categories SQL
avatar ggppdk ggppdk - change - 2 Sep 2017
Title
Bad performance of AdminModel saveOrder()
About performance of AdminModel saveOrder()
avatar ggppdk ggppdk - edited - 2 Sep 2017
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2018
Status New Discussion
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 7 Apr 2018
avatar brianteeman
brianteeman - comment - 10 Apr 2018

Sorry but as there has been no interest by anyone in moving forward with this feature request I am going to close it,

avatar brianteeman brianteeman - change - 10 Apr 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-04-10 13:38:06
Closed_By brianteeman
avatar brianteeman brianteeman - close - 10 Apr 2018

Add a Comment

Login with GitHub to post a comment