|  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
 [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 ( 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 "", 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 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.


Add a Patch

Pull Requests

Add a Pull Request


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

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Mar 30 20:01:24 2020 UTC