Performance and require / include
| From: | (Infoman: Thorsten Koch) | Date: | Fri, 18 Jul 2003 13:49:21 +0000 |
| Subject: | Performance and require / include | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-155766@lists.php.net to get a copy of this message | ||
Hello List,
i have a question about the require / include functions and performance.
I try to divide my application into several files (e.g. templates and common config files) and they
are included with the require statement. But is this really good for the performance? With only one
user on the webserver it doesn´t look like a problem. But what about 10 or 100 at the same time? Or
even more?
I made a test, i included 9 files (in different directories) with variable definitions and functions
and it took 0.087 seconds. then i wrote all the content from these 9 files to only one file and it
took 0.0005 seconds to execute.
Could this be a bottle neck, when more users access the application? What do you think? Are there
other ideas to scale/devide my application?
Greetings from germany
Thorsten Koch