[TYPO3-dev] Update database when saving plugin flexform configuration in BE?

Dmitry Dulepov dmitry.dulepov at gmail.com
Thu Sep 10 09:50:14 CEST 2009


Hi!

JoH asenau wrote:
> exec_SELECTquery, sql_fetch_assoc and sql_free_results are API functions
> too, aren't they?

The code is less readable if you use three instead of one.

> Besides the unnecessary function calls there is a difference - even if it
> doesn't seem to be significant -  since the one time loop gives you the row
> as subarray of blah[0] instead of a simple array. You get an unnecessary
> array just to split it up again.

Use list() as I showed in the example.

> During the performance meeting we had with Rupi in July, we found out that
> just replacing the unnecessary API function calls that have been implemented
> into the so called caching framework, with the appropriate ones (still API
> functions) definitely had an impact on the overall performance of the FE
> output. So I guess this might be true for the rest of the core as well.

Do not guess, provide numbers :)

Core has a lot of room for optimization, this is absolutely true. One thing to optimize is to make code smaller and more readable. Have a look to t3lib_TCEmain::process_datamap(). This is a monster! How much better could it be if its content would be moved to a smaller functions with clearly defined logical functionality...

I am for small functions that are readable at a glance.

-- 
Dmitry Dulepov
Facebook: http://www.facebook.com/dmitryd
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs




More information about the TYPO3-dev mailing list