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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 10:01:34 2025 UTC