|Thank you so much for the great article!!!|
Could you please answer the below questions? Thank you so much in advance
1.So does it mean that every time PHP page is requested , it will be compiled and executed or its only once?
2. Language like java are precompiled (JSPs can be precompiled or can be compiled when they are requested for the first time). Isn't it , the additional compile step will result in performance penality?
3. Java/.NET (asp.net) requires a deployment but PHP doesn't require a deployment. We can manipulate the PHP without having to compile the files.This looks like a great advantage as we dont need to bring down the server for any deployment. But how about performance?
|2011-10-14 01:43:31 - In reply to message 1 from RamJack|
|By default the Zend engine compiles PHP into Zend opcodes of each script on every request. But if you use a caching extension, it will store the compiled opcode in memory, so the same PHP script does not have to be compiled again because the first time execution compilation results are loaded from memory.|
So, there will be a performance penalty if you are not using a PHP opcode caching extension. This may become more noticeable if you have complex scripts that may need to load many classes running by a busy server.
Still keep in mind that sometimes script execute code that takes a lot more time to execute because they do things like database queries, which often take more time run, making the actual PHP compilation time negligible.
|2011-10-14 05:05:01 - In reply to message 2 from Manuel Lemos|
|Thank you so much for the real quick response!!!!!!Great explanation..We will look into opcode cache extension..Thank you again!!!|