note 55001 deleted from function.fpassthru by googleguy

From: Date: Tue, 22 Oct 2013 14:53:30 +0000
Subject: note 55001 deleted from function.fpassthru by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197201@lists.php.net to get a copy of this message
Note Submitter: herbert dot fischer at NOSPAM dot gmail dot com ---- readfile and fpassthru are about 55% slower than doing a loop with "feof/echo fread". I did an apache benchmark on Linux using PHP to read-and-show a 4MB JPG on browser and here are the results: * Concurrency Level: 200 * Complete requests: 1000 * Document Length: 4646204 bytes * Requests per second: - direct request to JPG: 72.07 - fpassthru: 11.28 - fread: 20.33 - readfile: 11.84 * Concurrency Level: 200 * Complete requests: 1000 * Document Length: 4646204 bytes * Requests per second: - direct request to JPG: 64.44 - fpassthru: 6.84 - fread: 19.45 - readfile: 8.76 If reading thru PHP is needed, I suggest using fread. If you can bypass PHP and do direct linking, than it's prefered.

« previous php.notes (#197201) next »