Task #54856

Optimize TypoScriptParser

Added by Michiel Roos about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
Start date:
2014-01-08
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
medium
Sprint Focus:

Description

The code in \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser gets called a lot. It needs to be optimised.

Problems:
  • Usage of inefficient function calls where language constructs would do the job
  • No dedicated Frontend parsing path. All the highlighting and linenumbering ifs are checked over and over for each layer of TypoScript that is being parsed
  • The amount of function calls can be greatly reduced

For the Introduction package, a page hit that is not yet in TYPO3 cache:

Number of Function Calls
before:    135.185
after:     111.251
reduction: -23.934 Or -17,7%

Incl. Wall Time
before:      6,31 s
after:       1,22 s
reduction:  -5,09 s Or -80,6%

Related issues

Related to TYPO3 Core - Bug #55357: TS Parser: Fix regression when having tabs in TS names Closed 2014-01-27
Related to TYPO3 Core - Bug #62188: TypoScriptParser doesn't trim modificator anymore Closed 2014-10-13

Associated revisions

Revision 718d9b6a (diff)
Added by Michiel Roos about 6 years ago

[TASK] Optimize TypoScriptParser

The code in \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser gets called
a lot. It needs to be optimised.

  • Use language constructs insted of function calls where possible
  • Cleanup method descriptions and parameter defaults

Resolves: #54856
Releases: 6.2
Change-Id: Ia52b3f72393288ed8259b25743a7403260eb5d73
Reviewed-on: https://review.typo3.org/26701
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Marcin S?gol
Tested-by: Marcin S?gol
Reviewed-by: Jo Hasenau
Tested-by: Jo Hasenau
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision 2773fdaf (diff)
Added by Stefan Froemken over 5 years ago

[BUGFIX] Add trim to modificators in TS-Parser

It is documented that modificators are trimmed in
TypoScriptParser. But since #54856 they aren't trimmed anymore.
That's why f.e. "addToList (value)" will not be executed.

Resolves: #62188
Related: #54856
Releases: master,6.2
Change-Id: I3828b22a836656ec808ac5d770d58803b9195102
Reviewed-on: http://review.typo3.org/33288
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 01712231 (diff)
Added by Stefan Froemken over 5 years ago

[BUGFIX] Add trim to modificators in TS-Parser

It is documented that modificators are trimmed in
TypoScriptParser. But since #54856 they aren't trimmed anymore.
That's why f.e. "addToList (value)" will not be executed.

Resolves: #62188
Related: #54856
Releases: master,6.2
Change-Id: I3828b22a836656ec808ac5d770d58803b9195102
Reviewed-on: http://review.typo3.org/33303
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#2 Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#3 Updated by Gerrit Code Review about 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#4 Updated by Gerrit Code Review about 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#5 Updated by Gerrit Code Review about 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#6 Updated by Gerrit Code Review about 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#7 Updated by Gerrit Code Review about 6 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#8 Updated by Gerrit Code Review about 6 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#9 Updated by Gerrit Code Review about 6 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#10 Updated by Gerrit Code Review about 6 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#11 Updated by Gerrit Code Review about 6 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#12 Updated by Gerrit Code Review about 6 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#13 Updated by Gerrit Code Review about 6 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#14 Updated by Gerrit Code Review about 6 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#15 Updated by Gerrit Code Review about 6 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#16 Updated by Gerrit Code Review about 6 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#17 Updated by Gerrit Code Review about 6 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#18 Updated by Gerrit Code Review about 6 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#19 Updated by Gerrit Code Review about 6 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#20 Updated by Gerrit Code Review about 6 years ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26701

#21 Updated by Michiel Roos about 6 years ago

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

#22 Updated by Riccardo De Contardi over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF