[TYPO3-dev] Update database when saving plugin flexform configuration in BE?
JoH asenau
info at cybercraft.de
Thu Sep 10 10:22:25 CEST 2009
Dmitry Dulepov wrote:
> 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.
>
> I am for small functions that are readable at a glance.
This is why I proposed to create exec_SELECTgetSingleRow, which would serve
both of us well - even if you tried to ridicule it.
And to "provide numbers":
We were able to increase the performance of the testing system significantly
(means: single to double digit percentages) just by replacing some API calls
with others and optimizing the code while still keeping it as readable as
possible. Especially exec_SELECTgetRows has been used in different places,
even though it was obvious that only one result row was to expect.
A loop doubles the number of function calls in case you only want one row,
since you have to call sql_fetch_assoc at least twice within the while loop
to get back FALSE for the missing second row. Even if we are just talking
about values < 1ms here, they will sum up to a significant value in the end,
which is even more significant, in case we just want to deliver a page from
cache, which would have been possible within just a few milliseconds.
Got the point?
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
TYPO3 workshops: http://workshops.eqony.com
More information about the TYPO3-dev
mailing list