php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36166 perfomance loss since php version 5.0.5
Submitted: 2006-01-26 16:21 UTC Modified: 2006-03-21 16:14 UTC
Votes:5
Avg. Score:4.2 ± 0.7
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: fschaper at intux dot org Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 5.1.2 OS: WindowsXP
Private report: No CVE-ID: None
 [2006-01-26 16:21 UTC] fschaper at intux dot org
Description:
------------
Since php version 5.05 we noticed an rather large performance hit in general while working with rather large array's. We have prepared an short sample which illustrates the problem. in php5 the script takes about 0.5 seconds to perform. The latest snapshot release from today and the current release version of php take about 4.5 seconds for the same task.

Reproduce code:
---------------
http://www.intux.org/bugs/perf_sample.zip
(About 181KB in size)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-26 16:23 UTC] fschaper at intux dot org
Original test with php5.05 ~ 0.5sec
php5.1 ~ 4.5sec
 [2006-01-28 10:55 UTC] kristian dot raue at jedox dot com
Here is a short 20 line php script that reproduces the bug. 

http://www.jedox.com/impulse/slow_php5_include.zip

There still is the 26000 line of code include file (fx.xcc). But this is what the bug is all about. The bug has nothing to do with large arrays, it is about including large include files. This took 0.5 sec in PHP 4 and PHP 5.05. In PHP 5.1.2 this takes 3 sec. The include file is a simple dummy file, please look at the code, it is trivial, 26000 line of repetious code.
 [2006-03-21 16:14 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

To speed up loading many files use an opcode cache such as APC. PHP 5 supports more language features which lead to the parser being slow, the way to "fix it" is by caching script opcodes so that the file does not need to compiled every time it is executed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 16:01:29 2024 UTC