php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25722 Performance degrades on every page request when including a large .php file
Submitted: 2003-10-01 17:29 UTC Modified: 2003-10-18 01:39 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:3 (75.0%)
From: j dot spit at uptime dot nl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2003-10-01 (dev) OS: Gentoo Linux 2.4.21
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: j dot spit at uptime dot nl
New email:
PHP Version: OS:

 

 [2003-10-01 17:29 UTC] j dot spit at uptime dot nl
Description:
------------
I'm using PHP ADODB in my application, using the latest PHP5 from cvs I get a performance problem. Consider a .php file where I include the file adodb.inc.php. Using my browser I go to my test page. Now on every page reload, I see apache consume more and more cpu, and I see that the page render time consistently increasing. This looks like some kind of memory problem to me. Please note that the AdoDB include file is over 100kb, I haven't seen this behaviour with smaller include files.

I tried different Adodb versions and switched between Apache 1 & 2, to no avail.

PHP5b1 does not have this problem.


Reproduce code:
---------------
<?
  $mtime = microtime();
  $mtime = explode( " ", $mtime );
  $start = $mtime[1] + $mtime[0];

  include_once( 'adodb.inc.php' );

  $mtime = microtime();
  $mtime = explode( " ", $mtime );
  $end = $mtime[1] + $mtime[0];

  echo $end - $start;
?>

Expected result:
----------------
Press refresh several times, you will see performance degrade and an execution time rise.

Actual result:
--------------
n/a

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-07 18:22 UTC] rep at devdomain dot com
I was just submitting this bug when your excellent pre-post script matched this similar one.

I'm not using ADODB, but I'm using SMARTY, that is itself quite a huge piece of include.

I'm using a late CVS version too. If I do a "service httpd restart", rendering goes back to the fast lane, but not for too long.

It seems that performance degrades as PHP serves pages, but the restart remedy indicates a memory problem...
 [2003-10-17 16:59 UTC] rep at devdomain dot com
Update:

I've compiled today's snapshot and it appears that the slowdown is gone.
 [2003-10-18 01:39 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 15:01:35 2025 UTC