? ? Success

User tests: Successful: Unsuccessful:

avatar ggppdk
ggppdk
22 Jun 2017

Pull Request for Issue #8884

Summary of Changes

Performance changes to allow categoryedit to scale well when number of category increases

  1. Remove a useless join from the categoryedit form field, used forms:
    banner form, category form, contact form, newsfeed form, article form (Backend / Frontend)
  2. Remove DISTINCT (duplicates were created because of the above removed JOIN)
  3. Merge sub-query with SELF to main query

Probably this join (1) originates from some code that was copied, or it was used by some code that is no longer present in categoryedit form field

Why its existense is useless , please read my explanation here:
#8884 (comment)

Also for worries of this join being used to remove child categories in category-edit form
so that you can not set a parent category to be under one of its childs !
The answer is that it is another join, please see my other comment here:
#8884 (comment)

Testing Instructions

  • the queries of the categoryedit should not produce query error on
    all forms that the field is used:
    banner form, category form, contact form, newsfeed form, article form (Backend / Frontend)
  • and categories displayed inside the category select should not be different
administrator/components/com_banners/models/forms/banner.xml(36):   type="categoryedit"
administrator/components/com_categories/models/forms/category.xml(34):  type="categoryedit"
administrator/components/com_contact/models/forms/contact.xml(73):  type="categoryedit"
administrator/components/com_content/models/forms/article.xml(77):   type="categoryedit"
administrator/components/com_newsfeeds/models/forms/newsfeed.xml(52):  type="categoryedit"
components/com_content/models/forms/article.xml(93):  type="categoryedit"

Expected result

Performance of categoryedit field scales with the number of categories e.g. 5000

Actual result

Performance of categoryedit field does not scales with number of categories

Documentation Changes Required

none

avatar ggppdk ggppdk - open - 22 Jun 2017
avatar ggppdk ggppdk - change - 22 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jun 2017
Category Administration com_categories
avatar csthomas
csthomas - comment - 22 Jun 2017

It is good, I think you could replace subquery by regular query, and remove distinct.

avatar ggppdk
ggppdk - comment - 22 Jun 2017

It is good, I think you could replace subquery by regular query, and remove distinct.

Yes, after the removal of the unused join

  • the DISTINCT seems to be no longer needed (need to check more carefully)
  • also yes the subquery can be merged with the main query ... (need to check this too more carefully)
avatar ggppdk ggppdk - change - 22 Jun 2017
Labels Added: ?
avatar ggppdk
ggppdk - comment - 22 Jun 2017

Ok besides the not used JOIN, I have

  • removed DISTINCT (duplicates were created because of the now removed JOIN, so no longer needed),
  • merged subquery to parent query

i did a little testing, it should be correct
just now i am not 100% sure of it

avatar ggppdk ggppdk - change - 23 Jun 2017
The description was changed
avatar ggppdk ggppdk - edited - 23 Jun 2017
avatar csthomas csthomas - test_item - 23 Jun 2017 - Tested successfully
avatar csthomas
csthomas - comment - 23 Jun 2017

I have tested this item successfully on f2460d9

+ code review


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

avatar dgt41 dgt41 - test_item - 23 Jun 2017 - Tested successfully
avatar dgt41
dgt41 - comment - 23 Jun 2017

I have tested this item successfully on f2460d9


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

avatar ggppdk ggppdk - change - 24 Jun 2017
The description was changed
avatar ggppdk ggppdk - edited - 24 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Jun 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Jun 2017

RTC after two successful tests.

avatar ggppdk ggppdk - change - 24 Jun 2017
The description was changed
avatar ggppdk ggppdk - edited - 24 Jun 2017
avatar ggppdk ggppdk - change - 24 Jun 2017
The description was changed
avatar ggppdk ggppdk - edited - 24 Jun 2017
avatar ggppdk ggppdk - change - 24 Jun 2017
The description was changed
avatar ggppdk ggppdk - edited - 24 Jun 2017
avatar rdeutz rdeutz - change - 25 Jun 2017
Milestone Added:
avatar rdeutz rdeutz - change - 5 Jul 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-07-05 16:23:32
Closed_By rdeutz
avatar rdeutz rdeutz - close - 5 Jul 2017
avatar rdeutz rdeutz - merge - 5 Jul 2017

Add a Comment

Login with GitHub to post a comment