Answer the question
In order to leave comments, you need to log in
Does the size of php files affect page loading? Is there a difference - the php file is small and all its methods are involved and the php file is large and the methods are the same?
Is there a difference in speed/performance - the php file is small and all its methods are involved, or the php file is large and the methods are the same as in the small one?
Answer the question
In order to leave comments, you need to log in
There is an impact, but a minor one - in order to execute the code, the php interpreter needs to read and parse each character in the file. Accordingly, the larger the file, the more time it takes. But the difference here is microsecond and the interpreter itself caches the data.
The browser sends a request to the server. The server processes the request, executes scripts, generates headers, and sends the html to the browser.
Answer: yes it does. But this does not depend on the quality of the code, but on the speed of its execution.
Small is faster. BUT the difference is minor.
At the same time, there are a lot of external factors.
a) The performance of the disk subsystem. ssd/hdd/usb flash drive
b) read caching at the operating system level
c) With installed accelerators, the source code is parsed once.
repeated accesses are processed from RAM according to a ready-made P-code
. The same volume, but in one case with small files / one
. One is faster. But it's not very convenient.
Symphony, for example, blinds them in heaps in the cache.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question