[TYPO3-core] Discussion: Remove default columns in favour for backend_layout

Philipp Gampe philipp.gampe at typo3.org
Thu Jul 19 13:31:46 CEST 2012


Hi Jigal,

Jigal van Hemert wrote:

> On 19-7-2012 12:03, Philipp Gampe wrote:
>> Parsing needs to be done anyway, as the content of the records are pretty
>> much TSconfig too.
> 
> This requires to take a look at the record first and then at TSconfig,
> because it is possible that TSconfig overrides the record. That is extra
> processing.

I do not know which way the parsing is done now, but I expect the TSconfig 
to be parsed first. So it cheep to listen to a flag or a doOverride that 
enables the overriding.

>> Considering the huge TS that is there by default, especially the RTE TS,
>> I do not thing that those few lines add a lot of parsing time.
> 
> Which is the argument of a few hundred features and so we end up with a
> few hundred times bits of parsing time.

Well, the TS is optional, thus you do not get the parsing penalty if you do 
not use it. What is left is a simple condition (and maybe an isset call) 
that switches between using values from TS or from the record.

If the syntax is the same (and I strongly encourage this) than the code is 
simple (pseudo-code):

if (is_array(tsConfig['tx_cms_backendlayout']['setup'][$recordKey])) {
  $recordTs = tsConfig['tx_cms_backendlayout']['setup'][$recordKey];
} elseif (numericOrWhatEver($recordKey)) {
  $recordTs = $this->getRecordTsConfig($recordKey);
} else {
 // handle default
}
if (!empty(tsConfig['tx_cms_backendlayout']['overruleRecords']) && 
is_array(...) {
  t3lib_div::array_merge_recursive($recordTS, tsConfig[...])
}

So where is the performance drawback?

I must agree that the backend layout patch is currently a mess, mostly 
because the page module code is kind of a mess. But once we have a solution 
on what to do, we can do it right, can't we?

>> But we should advice users to use records if they have many different
>> layouts.
> 
> Okay, some people are in favour of record and some in favour of
> TSconfig. IMO it can only be one of both.

Well, it has always been a strength of TYPO3 to be able to have an easy, but 
longer way and a fast, but more complicated way.

Best regards
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – linkvalidator
TYPO3 .... inspiring people to share!


More information about the TYPO3-team-core mailing list