Load reduction

Hello!

I have a configuration file that contains text that should be displayed on a specific page (texts of all pages in the file) I connect to the file

include ('/ data / config.php');

in this case, a 2.1 KB page is generated in 2 seconds. How to reduce this time?


Answer 1, authority 100%

Most likely, the size of data/config.phpis quite large, and most of the time is spent on its generation, since it contains all the pages of the site, that is, when you display one page, you generate code for all at once .

From the simplest – install an opcode cache (APC, XCache), but this will help if the content of the pages is static, in case of SQL queries, etc. then you need to change the processing logic.