slow php command line performance - is this normal or do I have an install problem?

Posted by Frank Schwieterman on Stack Overflow See other posts from Stack Overflow or by Frank Schwieterman
Published on 2010-03-27T06:24:13Z Indexed on 2010/03/27 6:33 UTC
Read the original article Hit count: 259

Filed under:

I have a simple PHP app that prints 'hello world'. When I run it from the command line it takes 6 seconds. Is this normal? It seems to take 1 seconds before "hello world" prints, then 5 seconds after. I assume this is overhead of the interpreter.

I am running PHP version 5.2.12 on Windows Server 2008 R2. Could this be an install issue, or is it typical? I did a manual install of PHP then added whatever components were needed to run Drupal. The only PHP addon I remember adding was MDB2, CGI support is there too.

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

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

© Stack Overflow or respective owner

Related posts about php