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

From: Date: Thu, 01 Aug 2002 14:38:53 +0000
Subject: #18683 [Opn]: Performance boost of require()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15740@lists.php.net to get a copy of this message
ID: 18683 Updated by: nohn@php.net Reported By: tiele@staff.start.be Status: Open Bug Type: Feature/Change Request Operating System: Unix PHP Version: 4.2.1 New Comment: I think the best thing would be storting this in SRM (www.vl-srm.net) Previous Comments: ------------------------------------------------------------------------ [2002-08-01 10:19:01] tiele@staff.start.be 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 this bug report at http://bugs.php.net/?id=18683&edit=1

« previous php.bugs (#15740) next »