? Success

User tests: Successful: Unsuccessful:

avatar ggppdk
ggppdk
16 Aug 2016

Fix creation performance of form element menuparent

  • used in menu item edit form

Summary of Changes

Remove unused left join in getOptions for menuparent form element

No reason because for it being there because
1. Join is left
2. The results of the join are not used anywhere neither in select nor where and not in any other clause
3. There is no PHP code that adds some usage of it under some condition

Testing Instructions

Visit menu item edit form and, check parent menuitem form field is as before

Documentation Changes Required

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
Title
Fix creation performance of form element menuparent Remove unused left join in getOptions for menuparent form element
Fix creation performance of form element menuparent, removing unused left join in getOptions for menuparent form element
avatar ggppdk ggppdk - edited - 16 Aug 2016
avatar ggppdk ggppdk - change - 16 Aug 2016
Title
Fix creation performance of form element menuparent, removing unused left join in getOptions for menuparent form element
Fix creation performance of form element menuparent, (used in menu item edit form)
avatar ggppdk ggppdk - edited - 16 Aug 2016
avatar ggppdk
ggppdk - comment - 16 Aug 2016

1 more optimization, replaced unneeded
group by with distinct

For reasoning behind the above,

  • and for when the above can be done without problems

please see my comment here for similar fix in :
#9516 (comment)

which was followed by @alikon making a similar PR, that was tested and merged, see here:
#9689

(and there maybe 1 or 2 more places that need similar changes)

avatar brianteeman
brianteeman - comment - 16 Aug 2016

Needs to be checked on all databases

On 16 August 2016 at 12:05, Georgios Papadakis notifications@github.com
wrote:

1 more optimization, replaced unneeded
group by with distinct

For reasoning behind the above,

  • and for when the above can be done without problems

please see my comment here for similar fix in :
#9516 (comment)
#9516 (comment)

which was followed by @alikon https://github.com/alikon making a
similar PR here , that was merged:
#9689 #9689


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#11628 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8TOWzIewyv1IKoTNKMeoDiJfOOsIks5qgZlngaJpZM4JlNVu
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar jeckodevelopment
jeckodevelopment - comment - 17 Aug 2016

Needs to be checked on all databases

@alikon can you help with this, please?

avatar ggppdk ggppdk - change - 17 Aug 2016
Title
Fix creation performance of form element menuparent, (used in menu item edit form)
Fix creation performance of form element menuparent, (slow down in menu item edit form, for item that belongs to large menu)
avatar ggppdk ggppdk - edited - 17 Aug 2016
avatar prathumwan
prathumwan - comment - 17 Aug 2016

could not measure it with debug because running out of memory, but if you see the result done by hand it's a big improvement.

select order by result:
joomla patch 11628 before

select distinct result:
joomla patch 11628 after

avatar alikon
alikon - comment - 17 Aug 2016

in postgresql don't work as it is now , it give an SQL ERROR
for the ORDER BY clause field is used a.lft and therefore must be in the select list of fields when the SELECT use DISTINCT()

@ggppdk i've submitted a PR ggppdk#2 to your branch with the fix for postgresql

@jeckodevelopment always happy to help when free time permits ;)

avatar ggppdk
ggppdk - comment - 17 Aug 2016

@alikon
Merged, thanks

avatar alikon
alikon - comment - 17 Aug 2016

@ggppdk thanks,
for the perfomance, have someone, some "decent" menu table dump to meter ?

p.s.
this query is still ugly a.published != -2 for example. etc...

avatar jeckodevelopment
jeckodevelopment - comment - 17 Aug 2016

@alikon you're our DB expert :) thank you

avatar ggppdk
ggppdk - comment - 17 Aug 2016

this query is still ugly a.published != -2 for example. etc...

ok but nothing significant to further improve performance

these 2 changes are enough to fix the performance issue, on large menu (with a few thousands of menu items)

  • removal of unsed self-join with the full table (unlike to the "parent" join that limits to -specific- row id)
  • the replacement of group-by with distinct , since we do not do use any aggregating function to calculate something
avatar alikon alikon - test_item - 18 Aug 2016 - Tested successfully
avatar alikon
alikon - comment - 18 Aug 2016

I have tested this item successfully on 2972851


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

avatar prathumwan prathumwan - test_item - 19 Aug 2016 - Tested successfully
avatar prathumwan
prathumwan - comment - 19 Aug 2016

I have tested this item successfully on 2972851


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

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/11628.

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

Add a Comment

Login with GitHub to post a comment