? Success
Related to # 6788

User tests: Successful: Unsuccessful:

avatar orware
orware
21 Jul 2016

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Hopefully this is the fastest way to create a new PR with just the changes needed for the JText::_() optimizations from #6788.

avatar orware orware - open - 21 Jul 2016
avatar orware orware - change - 21 Jul 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jul 2016
Category Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jul 2016
Labels Added: ?
avatar orware
orware - comment - 21 Jul 2016

Hi Andre,

Yes that is correct...I'm only checking for the presence for at least one backslash character (which would show up in all 3 of the cases being checked against for the str_replace call).

If there is at least one backslash then we need to process the str_replace call because there's a strong chance it'll be needed.

If there isn't at least one backslash then we don't need to process the str_replace call.

I believe that covers things correctly.

Mainly what I observed was that the vast majority of our language strings do not contain any of those 3 characters so running the str_replace call all of the time on every since language string was unnecessary (and there are lots of these calls). The extra if statement helps to avoid them with the faster strpos check.

avatar andrepereiradasilva andrepereiradasilva - test_item - 21 Jul 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 21 Jul 2016

I have tested this item successfully on c96e2a8


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

avatar gunjanpatel gunjanpatel - change - 22 Jul 2016
Rel_Number 0 6788
Relation Type Related to
avatar bertmert bertmert - test_item - 22 Jul 2016 - Tested successfully
avatar bertmert
bertmert - comment - 22 Jul 2016

I have tested this item successfully on c96e2a8


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

avatar brianteeman brianteeman - change - 22 Jul 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 22 Jul 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 22 Jul 2016
Labels Added: ?
avatar rdeutz rdeutz - change - 14 Aug 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-14 15:53:22
Closed_By rdeutz
avatar rdeutz rdeutz - close - 14 Aug 2016
avatar rdeutz rdeutz - merge - 14 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - close - 14 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment