[TYPO3-dev] [TYPO3-dam-devel] RFC #13641: dam_ttcontent: Use new TYPO3 4.3 hook for preview images in page modul

Francois Suter fsu-lists at cobweb.ch
Thu Feb 25 20:19:44 CET 2010


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...

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.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch




More information about the TYPO3-dev mailing list