Project

General

Profile

Actions

Task #45107

closed

Get rid of loadTCA and simplify FE cache behavior

Added by Christian Kuhn almost 12 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
Start date:
2013-02-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
hard
Sprint Focus:

Description

The frontend rendering aims to not load the full TCA including
columns settings to reduce rendering time for full cache pages.

This approach is ridiculous complex and using it is so hard to get
right for developers that even core patches in this area are
usually broken. The current situation is neither simple
nor transparent.

Currently, if no page cache entry exists during rendering, the whole
ext_tables.php are executed, the page is rendered and stuffed to
cache. While the full TCA is available at this point, it is reduced
to the 'ctrl' sections for the next run, without 'columns', and
stuffed to cache. On next access, the cache entry is used,
ext_tables.php and TCA is not fully loaded. This leads to all sort of
problems, if for example those pages contain USER_INT plugins that
rely on some TCA settings. Furthermore, it might happen, that
different plugins or the core then requires the ext_tables files more
than once, which leads to funny problems if some developer does not
know this and uses require_once instead of require inside
ext_tables.php. Issues like that are very hard to track down.

The current implementation relies on the methods TSFE->includeTCA(),
TSFE->getCompressedTCarray() and GeneralUtility->loadTCA(), where
especially includeTCA() with its parameter is so hard to understand
that it is impossible to use in a correct way without digging through
the content rendering for hours.

The patch obsoletes all three of the above methods. Instead, from now
on, the bootstrap in the frontend is configured to always load the
full TCA including columns sections, even in full cached context.
The only exception are eID scripts, but the existing API to load
additional TCA in the eID controller is modified to also load all.

On the downside, this patch costs around 30% of additional
performance for the rendering of full cached pages. As soon as there
is some USER_INT on a page, or if a page is not cached, the overhead
is around zero. So, this patch costs performance for 'simple' pages,
while it is of no effect for anything more complex.

The goal is to reduce developer headaches at this point and to
make the frontend rendering better predictable and more easy
to maintain. It is furthermore one step to implement a better
configuration handling in the long run.


Files

ab-n100-c2-without-patch.txt (2.59 KB) ab-n100-c2-without-patch.txt Philipp Gampe, 2013-02-03 22:32
ab-n100-c2-with-patch.txt (2.58 KB) ab-n100-c2-with-patch.txt Philipp Gampe, 2013-02-03 22:32
siege-without-patch.txt (4 KB) siege-without-patch.txt Philipp Gampe, 2013-02-03 22:32
siege-with-patch.txt (12 KB) siege-with-patch.txt Philipp Gampe, 2013-02-03 22:32

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #45187: Move t3lib/stddb/tables.sql to ext:core/ext_tables.sql Closed2013-02-05

Actions
Related to TYPO3 Core - Task #45188: Move t3lib/stddb/DefaultConfiguration.php to EXT:coreClosed2013-02-05

Actions
Related to TYPO3 Core - Task #45220: [TASK] Move t3lib/stddb files to ext:coreClosed2013-02-06

Actions
Related to TYPO3 Core - Feature #45767: Refactor TCA handlingClosedChristian Kuhn2013-02-23

Actions
Actions

Also available in: Atom PDF