Bug #64001 [Com]: Slow method invocation for PHP5.5.0 with Development Server

2013-01-18 Thread lisachenko dot it at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64001&edit=1

 ID: 64001
 Comment by: lisachenko dot it at gmail dot com
 Reported by:lisachenko dot it at gmail dot com
 Summary:Slow method invocation for PHP5.5.0 with Development
 Server
 Status: Feedback
 Type:   Bug
 Package:Performance problem
 Operating System:   Windows 7 x64
 PHP Version:5.5.0alpha3
 Block user comment: N
 Private report: N

 New Comment:

Rewriting the source code in that way fixes the issue and execution time is 
about 4us. But how presence of php.ini with default settings can be related 
with the speed of method invocation for my case?

Can you reproduce it with my code and my php.ini http://pastebin.com/zDNvzuvg ? 
Here is the difference for php -i for loaded/unloaded php.ini 
http://pastebin.com/BrxBaTJ0 Speed of execution for my previous code block is 
not equal (5us and 1ms)


Previous Comments:

[2013-01-18 09:18:47] larue...@php.net

How about change to this:

class TestPerformance {

public function speed()
{
$time  = microtime(true);
$this->nop();
$end   = microtime(true);
echo 'Took ', sprintf("%0.3fms to call method", ($end - $time) * 1e3);
}

protected function nop() {}
}

$instance = new TestPerformance;
$instance->speed();


[2013-01-17 10:35:26] lisachenko dot it at gmail dot com

Yeah, detected the issue. 

Configurations were the same for all installations (default configuration), so 
this issue doesn't relate to the output buffering. Just to be sure, I have 
compared output for "php -i" for all installations, there were only differences 
in REQUEST_TIME, build version and ... presence of loaded php.ini file for 
PHP5.4.10. 

If php.ini file is present (settings are still default) and loaded, then speed 
of method invocation is higher... Amazing ) Without php.ini (but with the same 
default settings) speed is lower for internal development server.

This can be reproduced with PHP5.4.10 too. So this performance bug is more 
general.


[2013-01-17 05:45:40] larue...@php.net

I can not reproduce this, do they (5.4 and 5.5) share the same php.ini 
configure?

I think maybe due to output buffer.


[2013-01-16 07:41:27] lisachenko dot it at gmail dot com

Update PHP version for issue manually (There isn't alpha3 in select).


[2013-01-16 07:38:38] lisachenko dot it at gmail dot com

Description:

I notice, that speed of method invocation for PHP5.5.0alpha3 is significantly 
slower than for PHP5.4 when running the script with internal Development 
Server. However, for CLI-mode PHP5.5.0 is faster than PHP5.4.10, as expected.

To reproduce the issue, please start the development server and execute test 
script in the browser.


Test script:
---
class TestPerformance {

public function speed()
{
$time  = microtime(true);
$this->nop();
echo 'Took ', sprintf("%0.3fms to call method", (microtime(true) - 
$time) * 1e3);
}

protected function nop() {}
}

$instance = new TestPerformance;
$instance->speed();

Expected result:

Expecting that method invocation will take microseconds to finish:
php-5.4.10-Win32-VC9-x86:
  Took 0.005ms to call method
php-5.5.0alpha3-Win32-VC9-x86:
  Took 0.00Xms to call method

Actual result:
--
Method invocation for 5.5.0alpha3 took millisecond to finish:
php-5.4.10-Win32-VC9-x86:
  Took 0.005ms to call method
php-5.5.0alpha3-Win32-VC9-x86:
  Took 1.008ms to call method
php-5.5.0alpha3-nts-Win32-VC9-x86:
  Took 1.000ms to call method






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64001&edit=1


Bug #64001 [Com]: Slow method invocation for PHP5.5.0 with Development Server

2013-01-17 Thread lisachenko dot it at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64001&edit=1

 ID: 64001
 Comment by: lisachenko dot it at gmail dot com
 Reported by:lisachenko dot it at gmail dot com
 Summary:Slow method invocation for PHP5.5.0 with Development
 Server
 Status: Feedback
 Type:   Bug
 Package:Performance problem
 Operating System:   Windows 7 x64
 PHP Version:5.5.0alpha3
 Block user comment: N
 Private report: N

 New Comment:

Yeah, detected the issue. 

Configurations were the same for all installations (default configuration), so 
this issue doesn't relate to the output buffering. Just to be sure, I have 
compared output for "php -i" for all installations, there were only differences 
in REQUEST_TIME, build version and ... presence of loaded php.ini file for 
PHP5.4.10. 

If php.ini file is present (settings are still default) and loaded, then speed 
of method invocation is higher... Amazing ) Without php.ini (but with the same 
default settings) speed is lower for internal development server.

This can be reproduced with PHP5.4.10 too. So this performance bug is more 
general.


Previous Comments:

[2013-01-17 05:45:40] larue...@php.net

I can not reproduce this, do they (5.4 and 5.5) share the same php.ini 
configure?

I think maybe due to output buffer.


[2013-01-16 07:41:27] lisachenko dot it at gmail dot com

Update PHP version for issue manually (There isn't alpha3 in select).


[2013-01-16 07:38:38] lisachenko dot it at gmail dot com

Description:

I notice, that speed of method invocation for PHP5.5.0alpha3 is significantly 
slower than for PHP5.4 when running the script with internal Development 
Server. However, for CLI-mode PHP5.5.0 is faster than PHP5.4.10, as expected.

To reproduce the issue, please start the development server and execute test 
script in the browser.


Test script:
---
class TestPerformance {

public function speed()
{
$time  = microtime(true);
$this->nop();
echo 'Took ', sprintf("%0.3fms to call method", (microtime(true) - 
$time) * 1e3);
}

protected function nop() {}
}

$instance = new TestPerformance;
$instance->speed();

Expected result:

Expecting that method invocation will take microseconds to finish:
php-5.4.10-Win32-VC9-x86:
  Took 0.005ms to call method
php-5.5.0alpha3-Win32-VC9-x86:
  Took 0.00Xms to call method

Actual result:
--
Method invocation for 5.5.0alpha3 took millisecond to finish:
php-5.4.10-Win32-VC9-x86:
  Took 0.005ms to call method
php-5.5.0alpha3-Win32-VC9-x86:
  Took 1.008ms to call method
php-5.5.0alpha3-nts-Win32-VC9-x86:
  Took 1.000ms to call method






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64001&edit=1