User tests: Successful: Unsuccessful:
Currently isInstalled
does a separate query when called multiple times. Also CMS does not use it anywhere. Changed the implementation of ComponentHelper
and ComponentRecord
to use the same cached data as in isEnabled
ComponentHelper::isInstalled should return correct value for installed and not installed component.
// Following should normally return true
JComponentHelper::isInstalled('com_content');
// Following should normally return false - unless you really have such component installed.
JComponentHelper::isInstalled('com_whatever');
com_test
and check following// true
JComponentHelper::isInstalled('com_test');
// true
JComponentHelper::isEnabled('com_test');
com_test
in extension manager and check following// true
JComponentHelper::isInstalled('com_test');
// false
JComponentHelper::isEnabled('com_test');
Update ComponentRecord
doc.
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
@franz-wohlkoenig Added detailed test instructions. Thanks for pointing out, I was little occupied that day and didn't want to hold the PR.
I have tested this item
Labels |
Added:
?
|
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-11-01 12:03:36 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Thank you for this change. I just stumbled upon this on a site that got ridiculously slow after upgrading to 3.8.1 and this change removed 140 queries and reduced the time it took for the DB down to a fifth.
@Hackwar Glad that it helped. @infograf768 was the first to point out this issue, thanks to him :)
@izharaazmi can you give more Test Instructions so People with less Dev-Skills can also test?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18308.