php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6279 "include" behaves *very* slowly (only with PHP4)
Submitted: 2000-08-21 13:06 UTC Modified: 2000-12-07 11:31 UTC
From: t dot rogall at jensen-stuart dot de Assigned:
Status: Closed Package: Performance problem
PHP Version: 4.0.1pl2 OS: Windiows NT 4.0 SP5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: t dot rogall at jensen-stuart dot de
New email:
PHP Version: OS:

 

 [2000-08-21 13:06 UTC] t dot rogall at jensen-stuart dot de
"include" needs up to 6 seconds to load a 15kb-script. The included script (text.inc) only contains some variable-declarations, for example:
$x = "a 1kb long text ....... ";
$y = "a 2kb long text .......";

1) This Problem seems to occur only with PHP4 on Windows (PHP3 on LINUX is OK, also PHP3 on NT)
2) When I include the declarations directly in the caller-script, execution-time reduces to 0.01 seconds (600 times faster!)
3) When I comment each line in "text.inc", the execution-time remains the same - so the reason seems to be the size of the file itself and not the evaluation of it
4) When I load the file text.inc into a $variable and then evaluate the $variable, also 6 seconds are needed. I detected that loading of the file is quite fast and nearly all the time is consumed by the "eval"-command (this is contrary to point 3)
5) When I decrease the size of the included file, the execution-time decreases proportionally
6) using "include" or "require" makes no difference

"include" seems to be buggy in another way: sometimes (1%) re-declaration-errors occur - obviously scripts (or included files) are evaluated two times. The error is not reproducable.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-01 02:58 UTC] andi@php.net
Does this still happen with 4.0.3pl1?
 [2000-12-07 11:31 UTC] sniper@php.net
Reopen if problem still exists with >=4.0.3pl1

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC