[TYPO3-core] RFC: #15094: Refactor of content objects of tslib_content

François Suter fsu-lists at cobweb.ch
Fri Jul 16 22:35:22 CEST 2010


Hi,

> The patch splits the cObj in single classes for each single content
> object, they are only instanciated when they are needed. This lead to a
> small cObj with only data of used content objects.
> The effect is less memory usage and better performance.

I'm looking forward to having that in the core. I don't have time for a 
review now, but I just skimmed through the patch and found that some 
lines could be further cleaned up (since you mention CGL cleanup):

-		30 => Array('params'=>'-colors 256', 'ext'=>'png'),
-		31 => Array('params'=>'-colors 128', 'ext'=>'png'),
-		32 => Array('params'=>'-colors 64', 'ext'=>'png'),
-		33 => Array('params'=>'-colors 32', 'ext'=>'png'),
-		34 => Array('params'=>'-colors 16', 'ext'=>'png'),
-		35 => Array('params'=>'-colors 8', 'ext'=>'png'),
-		39 => Array('params'=>'', 'ext'=>'png'),
+	30 => Array (
+		'params' => '-colors 256', 'ext' => 'png'
+	), 31 => Array (
+		'params' => '-colors 128', 'ext' => 'png'
+	), 32 => Array (
+		'params' => '-colors 64', 'ext' => 'png'
+	), 33 => Array (
+		'params' => '-colors 32', 'ext' => 'png'
+	), 34 => Array (
+		'params' => '-colors 16', 'ext' => 'png'
+	), 35 => Array (
+		'params' => '-colors 8', 'ext' => 'png'
+	), 39 => Array (
+		'params' => '', 'ext' => 'png'
+	),

I went through the CGL again and was surprised to find that we hadn't 
defined array declarations. However it seems to me that recently the 
tendency has been to use "array" (all lowercase) and no space before the 
opening bracket.

Furthermore I would say the code would look even better if each index 
was on a new line, i.e.:

31 => array(
		'params' => '-colors 128', 'ext' => 'png'
	),
32 => array(
		'params' => '-colors 64', 'ext' => 'png'
	),

Sorry for mentioning only this, which is not the most important part of 
the patch, but I don't have time to do better for now.

Cheers

-- 

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


More information about the TYPO3-team-core mailing list