Task #76086
closedTypoScript Parser: Consider to separate classes for TypoScript parser and syntax highlighting
0%
Description
Syntax highlighting is done by the same parser as the array building. This results in a large amount of if conditions to address the differences.
The code is harder to read and more difficult to maintain. There is likely an impact in performance and this is a critical part of the system.
I suggest to separate the TypoScript Parser and the Syntax Parser into separate classes. They address different concerns.
By fully focusing the given task, it becomes more easy to optimise it for speed.
In special the parser does recursive function calls for each nesting level of the identifier braces. While recursive function calls are elegant in style, a simple loop with a stack may be faster.
Syntax highlighting doesn't require a nesting parser at all.
Updated by Elmar Hinz over 8 years ago
To suggest a roadmap:
1.) Clone the parser class into array parser and syntax highlighter.
2.) Strip all highlighting stuff out of the TypoScript parser.
3.) Optimise the TS parser.
4.) Simplify the syntax highlighting to work as a lexer.
Updated by Susanne Moog over 5 years ago
- Status changed from New to Rejected
As this issue has not seen any work in the last three years and is a technical refactoring ticket, I'm closing it for now. It can be reopened once work starts.