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 #1

Updated by Gerrit Code Review almost 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17978

Actions #2

Updated by Gerrit Code Review almost 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17978

Updated by Philipp Gampe almost 12 years ago

This seems to have quite an effect on fully cached pages ... I would like to see some real world number of a bigger website with this patch.

I did some benchmarks with a fully cached page (IP, About TYPO3). The siege benchmarks include a hit after rm typo3temp/Cache/* and are run with -v -r 25 -b -c 2.
ab is run with -n 100 -c 2.

Actions #4

Updated by Gerrit Code Review almost 12 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17978

Actions #5

Updated by Gerrit Code Review almost 12 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17978

Actions #6

Updated by Tobias Liebig almost 12 years ago

Could you briefly explain what so expensive for the performance (30% sound like a real huge impact) ? Can we do anything to improve that?

Actions #7

Updated by Christian Kuhn almost 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master_new has been pushed to the review server.
It is available at https://review.typo3.org/18612

Actions #9

Updated by Christian Kuhn over 11 years ago

  • Status changed from Under Review to Resolved
Actions #10

Updated by Oliver Hader over 11 years ago

  • Target version changed from 6.1.0 to 6.1.0-alpha1
Actions #11

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF