diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
index 3308b878cd3281bab3785ee9394de5cda3d4d9ec..67b807878662f89c77d94ebd8875f0b0dd34d980 100644
--- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
+++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
@@ -3248,6 +3248,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      */
     public function preparePageContentGeneration()
     {
+        $this->getTimeTracker()->push('Prepare page content generation');
         if ($this->page['content_from_pid'] > 0) {
             // make REAL copy of TSFE object - not reference!
             $temp_copy_TSFE = clone $this;
@@ -3329,6 +3330,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
 
         // Global content object
         $this->newCObj();
+        $this->getTimeTracker()->pull();
     }
 
     /**
diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
index 044d0ddddc47eb6bdc55cc5ad19ce48b3e588064..94ce4c09ae382b319ea4447addf363949c2bd0b1 100644
--- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php
+++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
@@ -74,25 +74,22 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
 
         // Generate page
         $controller->setUrlIdToken();
-        $this->timeTracker->push('Page generation', '');
         if ($controller->isGeneratePage()) {
+            $this->timeTracker->push('Page generation');
             $controller->generatePage_preProcessing();
             $controller->preparePageContentGeneration();
             // Content generation
-            if (!$controller->isINTincScript()) {
-                PageGenerator::renderContent();
-                $controller->setAbsRefPrefix();
-            }
+            PageGenerator::renderContent();
+            $controller->setAbsRefPrefix();
             $controller->generatePage_postProcessing();
-        } elseif ($controller->isINTincScript()) {
-            $controller->preparePageContentGeneration();
+            $this->timeTracker->pull();
         }
         $controller->releaseLocks();
-        $this->timeTracker->pull();
 
-        // Render non-cached parts
+        // Render non-cached page parts by replacing placeholders which are taken from cache or added during page generation
         if ($controller->isINTincScript()) {
-            $this->timeTracker->push('Non-cached objects', '');
+            $controller->preparePageContentGeneration();
+            $this->timeTracker->push('Non-cached objects');
             $controller->INTincScript();
             $this->timeTracker->pull();
         }
diff --git a/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php b/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php
index fccdaa450b18048a55278e072e4f75b41634825b..e67889a79d5a0a593c8edd343ee0c9545cb69eb5 100644
--- a/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php
+++ b/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php
@@ -62,6 +62,7 @@ class PrepareTypoScriptFrontendRendering implements MiddlewareInterface
         $this->timeTracker->pull();
         // Get from cache
         $this->timeTracker->push('Get Page from cache', '');
+        // Locks may be acquired here
         $this->controller->getFromCache();
         $this->timeTracker->pull();
         // Get config if not already gotten