User tests: Successful: Unsuccessful:
Categoryedit field is quering the #__categories table, 2 times per category
Solution move query outside of the loop
[EDIT]
Better solution just remove the query completely, there is an other query to the categories table just above, we can use that one to retrieve each categories language
Open forms having categoryedit,
e.g. article form
the category selector appears as befoe
a single query is done to categories table by categoryedit field,
to get the language of categories that appear in the category selector
multiple queries are done: 1 query is done per category
you get 2 queries per category
e.g. 500 categories you get 1000 queries
e.g. 5000 categories you get 10000 queries
none
Category | ⇒ | Administration com_categories |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
It is morning now, i was making coffee and realized there is another query to the categories table just above,
so we can just remove the query completely
coffee always win
I have tested this item
Title |
|
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
J3.8.0 milestone ?
it is easy to review the changes too
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-27 16:09:53 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Ok why the title is like 1000 / 500 ?, it is not to be a smarta**, it is because it is better than saying "categoryedit does not scale", more people will notice and understand the need for this PR
so please excuse me for using the title ...
lately i am trying to use Joomla article form (which uses categoryedit field)
and my browser froze with 300 categories and debug on ... i had to stop what i was working on and track down this ...