Weak and weak question about efficiency? I just learned php and found that the biggest difference between php and java is that the interpretation language is different from the compilation language. Of course, the explanatory model is more dynamic, but it also reflects an efficiency issue. Many open-source frameworks use the single-intersection MVC mode. I have probably read: index. php/model/value // para/value/para/value... & nbsp; weak question about efficiency?
I just learned php and found that the biggest difference between php and java is that the interpretation language is different from the compilation language. Of course, the explanatory model is more dynamic, but it also reflects an efficiency issue.
Many open-source frameworks use the single-intersection MVC mode. I have probably read the following:
Index. php/model/value // para/value/para/value .....
Truncation parameter:/model/value/para/value has been a module parameter to dynamically introduce the corresponding Action php file:
Suppose I have 10 thousand modules, and index. php has different items to include each time.
I would like to ask: Will index. php generate 10 thousand compiled files every time the include items are different? for example:
Index_usermodel.class (the compiled file, not the php file ).
Can someone explain how PHP is compiled? We know that there is no efficiency problem in JAVA Import, and we don't know how PHP's Include solves this problem?
------ Solution --------------------
The underlying layer is unknown!
It is said that no, php does not have resident memory. Reload each time. Therefore, loading as little as possible is a principle. Therefore, php programs should be "flat" as much as possible ". Both routing and inlucde must be short.
It is said that the apc cache only solves the file io problem, but does not solve the memory allocation and other problems. If there is no apc, try to minimize the number of inlcude.
I have discussed a problem in javaeye before.
------ Solution --------------------
Discussion
There is also a simple question:
Each time a module is accessed, compiled once, or compiled for the first time.
------ Solution --------------------
Opcode itself can also be cached.
In addition, what language is used is never the bottleneck of the website.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service