[TYPO3-core] RFC #9779: t3lib_div::trimExplode limit parameter leads to wrong result with non-empty requirement
Franz Holzinger
franz at ttproducts.de
Tue Mar 3 09:14:17 CET 2009
Ingo Renner a écrit :
>
> Solution:
> * Adjust the unit tests for t3lib_div::trimExplode() to the expected
> behavior
I did a compare of the 2 calls:
1) explode(',', $teststring, 1);
2) explode(',', $teststring);
Your patch will force a complete explode in all cases.
1) 0.017 ms limit 1
2) 2.012 ms without limit
length of string 1474
This leads to a much slower code in a central function. It is more than
the factor 100 slower with a string of about 1000 characters. This could
however be avoided with an additional if.
I did not even test the rest of the new coming code.
- Franz
More information about the TYPO3-team-core
mailing list