[!!!][TASK] Get rid of loadTCA and simplify FE cache behavior 78/17978/5
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Feb 2013 11:13:25 +0000 (12:13 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 5 Feb 2013 11:14:44 +0000 (12:14 +0100)
commitd7b5d829e7d9a3a6699803e5c7ea308e6b2f55ca
tree75a2faba643727cbaca94829dc6b4b71e20ba6cb
parent5910c273d5d25a0550178b6db3eac2ff760e0e68
[!!!][TASK] Get rid of loadTCA and simplify FE cache behavior

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.

Change-Id: I5aecd542abe92f2de4ee0d40b5db44c493d304a3
Resolves: #45107
Releases: 6.1
Reviewed-on: https://review.typo3.org/17978
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Mattias Nilsson
Tested-by: Mattias Nilsson
65 files changed:
t3lib/class.t3lib_userauthgroup.php
t3lib/stddb/tables.php
typo3/show_item.php
typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/Wizard/EditController.php
typo3/sysext/backend/Classes/Form/DataPreprocessor.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/Element/SuggestElement.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/History/RecordHistory.php
typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/FrontendEditing/FrontendEditingController.php
typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/core/Classes/Resource/Driver/DriverRegistry.php
typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Tests/Unit/Utility/ExtensionMangementUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/Fixtures/RuntimeException.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php
typo3/sysext/css_styled_content/ext_tables.php
typo3/sysext/felogin/ext_tables.php
typo3/sysext/form/ext_tables.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Utility/EidUtility.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/ext_tables.php
typo3/sysext/install/Classes/Installer.php
typo3/sysext/lang/locallang_csh_em.xlf
typo3/sysext/lowlevel/Classes/CleanFlexformCommand.php
typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/openid/ext_tables.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/rtehtmlarea/hooks/softref/ext_tables.php
typo3/sysext/saltedpasswords/ext_tables.php
typo3/sysext/statictemplates/ext_tables.php
typo3/sysext/statictemplates/media/scripts/fe_adminLib.inc
typo3/sysext/t3editor/ext_tables.php
typo3/sysext/t3skin/ext_tables.php
typo3/sysext/tstemplate_info/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php