Project

General

Profile

Actions

Bug #21421

closed

slow t3lib_TSparser::parseSub

Added by Bernhard Kraft about 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Must have
Category:
-
Target version:
-
Start date:
2009-11-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There was a report about slow parsing of TS Templates in the dev list containing a description of the problem:
http://lists.typo3.org/pipermail/typo3-dev/2009-October/037545.html

This issue got raised by commit with rev. 5395 which was conducted by me. It should solve bug #17627 "External TypoScripts files will always be cached".

Cause of problem:
When the "procesIncludes" method is called now, it adds an array entry to the $this->rowSum array, for each included file. For each included file an array containing name of the file and last modification time (mtime) is appended to rowSum.

But "procesIncludes" only gets called from "generatedConfig" when finally the TypoScript config gets parsed, and not by the "runThroughTemplates" method, which simply builds up the "rowSum" array to check if a parsed TypoScript can get retrieved from cache.

Solution:
Add a call to "processIncludes" at the end of method "runThroughTemplates". This wont have a big performance impact, as nothing gets parsed. The TypoScript code just gets searched for the "<INCLUDE_TYPOSCRIPT ...>" tag using a regular expression. Also all included files will get loaded and searched for the include-tag and all mtimes will get evaluated. I tried this on my local machine and achieved parse times as usual.

See attached patch against 4.3.0beta2 and TRUNK.

(issue imported from #M12428)


Files

patch_slowTSparser_4.3.0beta2.diff (489 Bytes) patch_slowTSparser_4.3.0beta2.diff Administrator Admin, 2009-11-01 22:22
patch_slowTSparser_TRUNK.diff (380 Bytes) patch_slowTSparser_TRUNK.diff Administrator Admin, 2009-11-01 22:23
tstemplate_charset.diff (3.01 KB) tstemplate_charset.diff Administrator Admin, 2009-11-18 21:31

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #17627: External TypoScripts files will always be cachedClosedBernhard Kraft2007-09-24

Actions
Related to TYPO3 Core - Feature #21525: No typoscript template found - AddonClosed2009-11-10

Actions
Related to TYPO3 Core - Bug #21569: Wrong character encoding in cache tables breaks frontend renderingClosedOliver Hader2009-11-16

Actions
Actions

Also available in: Atom PDF