? Success

User tests: Successful: Unsuccessful:

avatar ggppdk
ggppdk
16 Aug 2016

Pull Request for Issue #10997

Fixes performance of creating" Select Page" filter (= menu item filter) in modules manager

Summary of Changes

Removed unused left join, joining menu items table with itself for no reason

No reason because
1. Join is LEFT
2. The results of the join are not used anywhere

  • neither in SELECT clause nor WHERE clause and not in any other clause
  • There is no PHP code that adds some usage of it under some condition

There is already another (different) self-join for the table on the lft/rgt, similar to the one removed when we limit to a specific parent parent

Testing Instructions

Visit module manager and open search filters, the "Select page" filter should be same as before, and behave as before

Documentation Changes Required

none

avatar joomla-cms-bot joomla-cms-bot - change - 16 Aug 2016
Category Administration Components
avatar ggppdk ggppdk - open - 16 Aug 2016
avatar ggppdk ggppdk - change - 16 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Aug 2016
Labels Added: ?
avatar ggppdk ggppdk - change - 16 Aug 2016
The description was changed
avatar ggppdk ggppdk - edited - 16 Aug 2016
avatar ggppdk ggppdk - change - 16 Aug 2016
Title
Fix performance retrieve menu items in menus helper (e.g. creating select drop downs with menu items)
Fix performance retrieve menu items in menus helper, e.g. when creating "Select page" filter in modules manager
avatar ggppdk ggppdk - edited - 16 Aug 2016
avatar ggppdk ggppdk - change - 16 Aug 2016
The description was changed
avatar ggppdk ggppdk - edited - 16 Aug 2016
avatar ggppdk ggppdk - change - 16 Aug 2016
The description was changed
avatar ggppdk ggppdk - edited - 16 Aug 2016
avatar ggppdk ggppdk - change - 16 Aug 2016
Title
Fix performance retrieve menu items in menus helper, e.g. when creating "Select page" filter in modules manager
Fix performance retrieving menu items in menus helper, e.g. when creating "Select page" filter in modules manager
avatar ggppdk ggppdk - edited - 16 Aug 2016
avatar prathumwan
prathumwan - comment - 17 Aug 2016

tested successful, speed is back.

avatar andrepereiradasilva
andrepereiradasilva - comment - 17 Aug 2016

@prathumwan please mark as tested with success in https://issues.joomla.org/tracker/joomla-cms/11627?nocache
Login with github as mark as tested with success

avatar ggppdk ggppdk - change - 17 Aug 2016
The description was changed
avatar ggppdk ggppdk - edited - 17 Aug 2016
avatar ggppdk ggppdk - edited - 17 Aug 2016
avatar ggppdk ggppdk - change - 17 Aug 2016
The description was changed
avatar ggppdk ggppdk - edited - 17 Aug 2016
avatar prathumwan prathumwan - test_item - 17 Aug 2016 - Tested successfully
avatar prathumwan
prathumwan - comment - 17 Aug 2016

I have tested this item successfully on

search filter for page works, performance is back


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

avatar ggppdk
ggppdk - comment - 17 Aug 2016

@prathumwan

also, since you have big set of menu items

besides this PR, also please see PR #11628 that

  • fixes performance of menu item FORM

(fixes performance creating menuparent form element, (edit an item that belongs to a large menu)

Go to your largest menu and edit an item there:
then edit it with applying this patch: #11628 , and reply there and not here

avatar alikon alikon - test_item - 18 Aug 2016 - Tested successfully
avatar alikon
alikon - comment - 18 Aug 2016

I have tested this item successfully on 7a19975


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

avatar ggppdk ggppdk - change - 18 Aug 2016
The description was changed
avatar ggppdk ggppdk - edited - 18 Aug 2016
avatar ggppdk ggppdk - change - 18 Aug 2016
The description was changed
avatar ggppdk ggppdk - edited - 18 Aug 2016
avatar ggppdk ggppdk - edited - 18 Aug 2016
avatar ggppdk
ggppdk - comment - 18 Aug 2016

This PR patches the menus helper method: MenusHelper::getMenuLinks()

  • so the performance is fixed in all places that use it

That is wherever a menu item select drop is created e.g. "search filter" "select page" in modules manager

and also edit forms that have assignments to menu items

  • template edit form
  • module edit form
administrator\components\com_modules\views\module\tmpl\edit_assignment.php(14): $menuTypes = MenusHelper::getMenuLinks();
administrator\components\com_templates\views\style\tmpl\edit_assignment.php(14): $menuTypes = MenusHelper::getMenuLinks();
administrator\templates\hathor\html\com_modules\module\edit_assignment.php(14): $menuTypes = MenusHelper::getMenuLinks();
administrator\templates\hathor\html\com_templates\style\edit_assignment.php(14): $menuTypes = MenusHelper::getMenuLinks();
libraries\cms\form\field\menuitem.php(160):         $items = MenusHelper::getMenuLinks($menuType, 0, 0, $this->published, $this->language);
avatar andrepereiradasilva
andrepereiradasilva - comment - 21 Aug 2016

ok so with a small menu (15 menu items) we can still notice the changes:

Before patch

image

After patch

image

Note: Code i used for test:

!JDEBUG ?: JProfiler::getInstance('Application')->mark('- start query');
$links = $db->loadObjectList();
!JDEBUG ?: JProfiler::getInstance('Application')->mark('- end query');
avatar andrepereiradasilva andrepereiradasilva - test_item - 21 Aug 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 21 Aug 2016

I have tested this item successfully on 7a19975

as comment above


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 21 Aug 2016

can we have RTC here?

avatar brianteeman brianteeman - change - 21 Aug 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 21 Aug 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 21 Aug 2016
Labels Added: ?
avatar rdeutz rdeutz - change - 22 Aug 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-22 19:51:01
Closed_By rdeutz
avatar rdeutz rdeutz - close - 22 Aug 2016
avatar rdeutz rdeutz - merge - 22 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - close - 22 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment