[TYPO3-core] RFC #17489: [Performance] Improve t3lib_extMgm::addToAllTCAtypes performance

Helmut Hummel helmut.hummel at typo3.org
Thu Feb 10 20:30:20 CET 2011


Hi,

On 10.02.11 16:13, Jigal van Hemert wrote:
> Hi,
> 
> On 10-2-2011 14:12, JoH asenau wrote:
>> Attached v7
> 
> +1 by reading and testing (trunk)

Really? Many unit tests fail after applying the patch.

Just by reading:

The patch removes the only return statement in
removeDuplicatesForInsertion()

How can this work?

I also fear, that

if (strpos($needle, $insertionPosition) !== FALSE)

does not do the same as

$positions = t3lib_div::trimExplode(',', $insertionPosition, TRUE);
if (in_array($needle, $positions)) {

Consider this example:

$list = 'header,header_layout,bodytext';
$insertionPosition = 'header';

If I'm not wrong, the new field would be inserted twice, because strpos
matches for "header" and "header_layout".

But I did not test this yet.

Nevertheless -1 by reading for now.

Kind regards,
Helmut

-- 
Helmut Hummel
TYPO3 Security Team Leader

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-team-core mailing list