PHP 4.0 Bug #6279: "include" behaves *very* slowly (only with PHP4)

From: Date: Mon, 21 Aug 2000 17:06:19 +0000
Subject: PHP 4.0 Bug #6279: "include" behaves *very* slowly (only with PHP4)
Groups: php.dev 
Request: Send a blank email to php-dev+get-30075@lists.php.net to get a copy of this message
From: t.rogall@jensen-stuart.de Operating system: Windiows NT 4.0 SP5 PHP version: 4.0.1pl2 PHP Bug Type: Dynamic loading related Bug description: "include" behaves *very* slowly (only with PHP4) "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.

« previous php.dev (#30075) next »