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

JoH asenau info at cybercraft.de
Thu Feb 10 22:16:16 CET 2011


Am 10.02.2011 20:30, schrieb Helmut Hummel:
> 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.

You are right with both issues, so I will come up with a fixed v7 later.

Cheers

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com


More information about the TYPO3-team-core mailing list