Slow php command line performance - is this normal or do I have a problem installing?

I have a simple PHP application that prints "hello world." When I run it from the command line, it takes 6 seconds. This is normal? It seems like 1 second before printing "hello world", then after 5 seconds.

I am running PHP version 5.2.12 on Windows Server 2008 R2. Could this be a setup problem, or is this typical? I performed a manual installation of PHP, and then added all the components necessary to run Drupal. The only PHP addition that I remember was MDB2, there is also CGI support.

I am using a Lua project that I run from the command line, hundreds of lines of code that will run in a second.

I have some unit tests that I run from the command line, and already with some of them they are very slow. I run them from Netbeans and the tests are still very slow.

I am doing exactly this:

C:\temp>copy con test.php <?php print('hello, world'); ^Z 1 file(s) copied. C:\temp>test.php hello, world 
+4
source share
1 answer

The only way I could solve it was to go through the php.ini file and look for something strange. In the end, I tried to disable the loaded DLLs and solve this problem. Performance DLLs affecting performance are php_curl.dll and php_mysql.dll, although I only needed to remove php_curl.dll to solve this problem.

php_mysql.dll does not cause any problems on its own. php_curl.dll adds a 1 second delay and a 4 second delay if used with php_mysql.dll. I don’t remember why I added php_curl.dll, so I’ll probably pull it out now.

+7
source

Source: https://habr.com/ru/post/1305291/


All Articles