Optimizer in the PHP parser ??
Posted: Mon Jan 27, 2003 5:17 am
This post is about how the PHP parser handles includes and concatenation of strings.
I'm posting it because I know that ASP for IIS (I'm not talking about ASP.NET) has a very slow behaviour when concatenating strings and compiling ASP-pages using server side includes, SSI.
First:
Every time the ASP engine runs across a SSI-tag. It takes a note and starts compilation over again.
Thus, when having four includes the ASP-page is parsed five times before beeing ready to run.
How does the PHP parser handle includes?
I guess this isn't really a concern for those who use PHP Accelerator, since the compilation of a page is cached in such a system.
Second:
Everytime th ASP engine runs across an ampersand between two strings in an ASP-page, it moves the entire original string memory block to another place where the concatenation actually happens. I guess this has something to do with avoiding fragmentation and memory linearity.
How does the PHP parser handle string concatenation?
I'm posting it because I know that ASP for IIS (I'm not talking about ASP.NET) has a very slow behaviour when concatenating strings and compiling ASP-pages using server side includes, SSI.
First:
Every time the ASP engine runs across a SSI-tag. It takes a note and starts compilation over again.
Thus, when having four includes the ASP-page is parsed five times before beeing ready to run.
How does the PHP parser handle includes?
I guess this isn't really a concern for those who use PHP Accelerator, since the compilation of a page is cached in such a system.
Second:
Everytime th ASP engine runs across an ampersand between two strings in an ASP-page, it moves the entire original string memory block to another place where the concatenation actually happens. I guess this has something to do with avoiding fragmentation and memory linearity.
How does the PHP parser handle string concatenation?