Project

General

Profile

Actions

Task #102877

closed

Remove todo for intExplode function in GeneralUtility

Added by Torben Hansen 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
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 #1

Updated by Gerrit Code Review 10 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82534

Actions #2

Updated by Torben Hansen 10 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF