[TYPO3-dev] [TYPO3-dam-devel] RFC #13641: dam_ttcontent: Use new TYPO3 4.3 hook for preview images in page modul
Steffen Kamper
ks at dislabs.de
Thu Feb 25 21:10:18 CET 2010
Hi,
Francois Suter schrieb:
> Hi,
>
>> $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['textpic']
>>
>> etc. The drawback of current hook is that it is called for every CType
>> which is a bit performance killer.
>
> I'm not surprised, this is how most hooks are implemented in the Core. I
> guess we inherited bad habits and just go on using them. We should be
> more careful in the future. There's the same kind of problems with
> TCEmain hooks, which get called all the time and the first thing you do
> inside them is test which table is being handled...
>
the badest is having 2 hooks doing exact the same ...
> Of course generic hooks are probably desirable in some cases. Maybe we
> could list the most-called hooks and duplicate them with some more
> specific hooks. This would not break existing hook uses, but allow for
> more improvements by using the more finely targeted hooks.
>
I have no problem with general hooks if they make sense. In this case
there could be a general hook and a specific one.
Maybe we should rethink about our hook system in general. I think noone
has a overview about all existing ones, and if one is in you can't
remove because of possible usage.
I think we have too much of these methods, having XCLASS and hooks. If
i'am in a system i didn't setup, i always find it difficult to find out
why it behaves different from standard setup - is it XCLASSed, hooked or
whatever. Why is it slow, why has it duplicate fields, why is TCA
manipulated etc.
vg Steffen
More information about the TYPO3-dev
mailing list