Feature #90146
closedTypoScript includes and imports are a real performance bottleneck and should be cached (in a prod environment)
100%
Description
I have debugged my recent project on a managed server, because the request times were just too high. What I found, came by surprise for me. TypoScript includes and imports are reavluated and read from the filesystem on EVERY request (see processIncludes). Every default setup uses the static template from fluid_styled_content, which will include about 30 files. I control my root templates in a VCS, so add 10 more files. Meaning: On every request 40 files are read from the filesystem! The filesystem is slow. The parse process of TypoScript shoule be fast. But with this many reads from the drive, I loose 10ms on my dev system and 50ms on the managed server. Today, the whole rendering process until the first byte is sent should take 50ms... Here is a chance to improve the performance of Typo3 in a noticeable way.
The hashed import/include statement in the first cycle (includeFile) should be used as a cache identifier to store the complete TypoScript of an top level import/include. The caching should only be active, when the application context is Development
or a config flag is set.