Project

General

Profile

Actions

Bug #20068

closed

simplify and speed up t3lib_div::trimExplode()

Added by Ingo Renner about 15 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-02-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

currently trimExplode() uses loops to process elements of arrays created by an explode before. Using native php functions that achieve the same goal is simpler, shorter, and most importantly faster.

using the benchmark I usually get a speed up of 30-50%, I even had 70% once
(issue imported from #M10511)


Files

simpler_faster_trimExplode_v2.diff (5.18 KB) simpler_faster_trimExplode_v2.diff Administrator Admin, 2009-02-21 14:50
benchmark_trimExplode.php (1.87 KB) benchmark_trimExplode.php Administrator Admin, 2009-02-21 14:51
simpler_faster_trimExplode_v3.diff (4.63 KB) simpler_faster_trimExplode_v3.diff Administrator Admin, 2009-02-21 16:35

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #19601: t3lib_div::trimExplode limit parameter leads to wrong result with non-empty requirementClosedOliver Hader2008-11-12

Actions
Actions #1

Updated by Ingo Renner about 15 years ago

committed to trunk (4.3)

Actions

Also available in: Atom PDF