[TYPO3-dev] Typoscript parser C implementation
Bernhard Kraft
kraftb at think-open.at
Tue Aug 26 11:23:06 CEST 2014
Hi,
On 08/22/2014 07:09 PM, Olle Haerstedt wrote:
> Has anyone ever thought of implementing the Typoscript parser as a PHP
> extension in C? It might speed up some loading time, but I'm not sure if
> parsing Typoscript is a bottleneck in any way. The parser is only 1200
> lines, so it would surely be possible.
I created this in 2006:
http://wiki.typo3.org/TypoScript_technical_aspects
Its a BNF notation of TypoScript. At that time I also wanted to
implement a TypoScript parser using flex/bison and yacc. But then PHP
accelerators got more widely used and even proposed by the install tool
and as TypoScript gets cached in a parsed and serialized form I dropped
the idea.
Altough I think implementing many heavy-used methods of TYPO3 in a PHP
module could speed things up quite a bit. I started to create an example
project on github but it currently only implements "trimExplode":
https://github.com/kraftb/php5_typo3
Of course this only makes sense for methods which do not change on
version-to-version basis as the effort for keeping the module uptodate
would be too much. But I think "trimExplode" is a good example.
Right yesterday I coded my first mysql UDF (userdefined function) for a
project. Maybe this would also be a possible entry point for optimizations:
https://github.com/kraftb/lib_mysqludf_fields_sh
But finally all heavy-load sites make use of some content caching
mechanism which involves not to call PHP at all. So either
"nc_staticfilecach", varnish or some CDN like akamai. So this
optimizations would make sense to reduce energe requirements of servers
for generating pages and increase page generation time a bit ...
greetings,
Bernhard
More information about the TYPO3-dev
mailing list