? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
18 Feb 2017

Summary of Changes

  1. Deprecate passing the $option parameter into the method and making sure the extension is actually loaded; this turns the load() method's single responsibility into loading the data into memory and nothing more. As of 4.0, the class internals (and if someone extended the class for any reason) should do its own validation the key exists in the static array versus relying on the loader to do it.
  2. Changes the cache ID from the $option parameter to the result of __METHOD__ to ensure a consistent cache ID for the loader versus something that is dynamic and probably results in extra calls to the cache due to the different IDs that result.

Testing Instructions

  1. Validate the query in the lambda function within JComponentHelper::load() runs one time and one time only for the request.
  2. Validate that there is only a single cache object for this data.
  3. Validate that everything still works normally otherwise.
avatar mbabker mbabker - open - 18 Feb 2017
avatar mbabker mbabker - change - 18 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Feb 2017
Category Libraries
avatar joomdonation joomdonation - test_item - 19 Feb 2017 - Tested successfully
avatar joomdonation
joomdonation - comment - 19 Feb 2017

I have tested this item successfully on 65bb7f8

Tested and confirm all 3 points in testing instructions are passed.


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

avatar csthomas csthomas - test_item - 21 Feb 2017 - Tested successfully
avatar csthomas
csthomas - comment - 21 Feb 2017

I have tested this item successfully on 65bb7f8

Test success.


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

avatar zero-24 zero-24 - change - 21 Feb 2017
Milestone Added:
Status Pending Ready to Commit
Labels Added: ? ?
avatar mbabker
mbabker - comment - 21 Feb 2017

I'm backing out on this for now.

avatar mbabker mbabker - change - 21 Feb 2017
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2017-02-21 17:29:16
Closed_By mbabker
Labels
avatar mbabker mbabker - close - 21 Feb 2017
avatar csthomas
csthomas - comment - 21 Feb 2017

I have to back my comment at #14046 (comment).

For me this PR #14134 is still OK and should be reopened again.

Assets and Url router always load full components lists to memory.
So we can not load only one component to improve performance.

avatar mbabker mbabker - change - 21 Feb 2017
Status Closed New
Closed_Date 2017-02-21 17:29:16
Closed_By mbabker
Labels Removed: ?
avatar mbabker mbabker - change - 21 Feb 2017
Status New Pending
avatar mbabker mbabker - reopen - 21 Feb 2017
avatar mbabker
mbabker - comment - 21 Feb 2017

Alright, fine. I swear this is the last time I'm ever touching these helpers, my gray hair count is increasing exponentially dealing with them.

avatar csthomas
csthomas - comment - 21 Feb 2017

I'm sorry, I have created a mess.
There is no b/c problem. The method load($option) cache all components. Name of one component should not be a key for this cached data, so Michael use __METHOD__.

Please RTC.

avatar wilsonge wilsonge - change - 21 Feb 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-21 20:24:52
Closed_By wilsonge
avatar wilsonge wilsonge - close - 21 Feb 2017
avatar wilsonge wilsonge - merge - 21 Feb 2017

Add a Comment

Login with GitHub to post a comment