[TYPO3-core] RFC #11410: Speed up BEgetRootLine by reusing parts of the rootline from the cache

Rupert Germann rupi at gmx.li
Tue Aug 4 14:58:40 CEST 2009


hi Michi,

Michael Stucki schrieb:
> there are two things in the patch which I don't really like. Not sure if
> you did that by intention or by mistake. If so, please let me know.
> Otherwise, I'm going to commit this follow-up (see attached)...

both are done by intention

I used "pre-increment" at --$c; because it's faster than post-increment: 
http://www.tuxradar.com/practicalphp/18/1/8
and this is a speed critical function.

concerning "assignments in conditions" CGL says:

"Assignment in conditions should be avoided. However if it makes sense 
to do assignment in condition, it should be surrounded by the extra pair 
of brackets. Example:
	if (($fields = $GLOBALS['TYPO3_DB']->sql_fetch_result($res))) {
		// Do something
	}
"

greets
rupert





More information about the TYPO3-team-core mailing list