Actions
Task #102877
closedRemove todo for intExplode function in GeneralUtility
Start date:
2024-01-20
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
A todo added for the GeneralUtility::intExplode()
function suggests refactor the function by using array_filter
and array_walk
. This refactoring may be good in terms of readability, but has negative impact on the performance of the function when used with large strings containing many comma separated values.
Example php script for a performance comparison: https://gist.github.com/derhansen/e0751d896ba0d48917dccd44bd4e4d1e
Result in seconds for 1.000.000 comma separated numbers in a string:
Old: 0.16220808029175 New: 0.68774104118347
I would therefore prefer to keep the function as it is and remove the todo.
Actions