#18683 [NEW]: Performance boost of require()

From: Date: Thu, 01 Aug 2002 14:19:02 +0000
Subject: #18683 [NEW]: Performance boost of require()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15739@lists.php.net to get a copy of this message
From: tiele@staff.start.be Operating system: Unix PHP version: 4.2.1 PHP Bug Type: Feature/Change Request Bug description: Performance boost of require() Hey, this is not a real feature request or a bug... just something that came to my attention when benchmarking my script. I have added a note on the require() page with the script and some explination. I have a script that requires the use of other php scripts. Some of them over a 1000 times (think of a template for a hyperlink). Normally i would 'require' this file 1000 times but when thinking this over, this would mean that there would be 1000 times disk activity. When storing the contents of that other php script into a string and evaluating this 1000 times i noticed this was 10 to 100 times faster. Perhaps it would be possible to either adjust the require() function or to add require_stick() that would hold this template in it's memory until the main script is done or some flush is done. Just trying to put out a helping hand. Keep it up ! Greets from belgium, Tiele -- Edit bug report at http://bugs.php.net/?id=18683&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18683&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18683&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18683&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18683&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18683&r=support Expected behavior: http://bugs.php.net/fix.php?id=18683&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18683&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18683&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18683&r=globals

« previous php.bugs (#15739) next »