Re: optimise gd transformations
| From: | Marek Kilimajer | Date: | Thu, 24 Oct 2002 08:47:18 +0000 |
| Subject: | Re: optimise gd transformations | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121213@lists.php.net to get a copy of this message | ||
these are headers in your html document, but I ment the headers you send together with your thumbnails.
Preferably you should check if the browser has send you If-modified-since, compare it with filemtime of
your 150 thumbnail, and if it has not been modified since, send a 304 Not Modified response.
Now you will spare some cpu cycles.
electroteque wrote:
with a static version but it keeps the old versions which is why i generate on the fly as the preview is always the newer version here is the expire header <META HTTP-EQUIV="Cache-Control" CONTENT="No-Cache"> <META HTTP-EQUIV="Pragma" CONTENT="No-Cache"> <META HTTP-EQUIV="Expires" CONTENT="0"> but it still wont refresh it "Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message news:3DB66D4D.6060700@webglobe.sk...Create them once, and you are done. Also make sure to send some expires header, else browser allways tries to fetch a new copy electroteque wrote:pixelshi there , i ran top to find out how much processing gd2 truecolor transformations take on the cpu, i am getting around 20% x 2 httpd processes, i was wondering how it would be possible to optimise this so i will use less cpu resources ? i am simply generating thumbnails of 70of alreayd resized thumbnails of 150 pixels, let me know