Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Peter H. Coffin" Newsgroups: comp.lang.php Subject: Re: Windows binaries 64bit for PHP Date: Wed, 9 May 2012 11:34:18 -0500 Organization: A noiseless patient Spider Lines: 47 Message-ID: References: <4FA6A2C4.6030708@arnowelzel.de> <4FA80EF3.5000806@arnowelzel.de> <370jq7t07vrqpqn8l94rbpgcb4vmifma0q@mfesser.de> <4faa2335$0$6947$e4fe514c@news2.news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="le/2G4+BNpieVhQI6uJ2Lw"; logging-data="19297"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vToz38Cb4ARkBuiNsEFZn" User-Agent: slrn/0.9.9p1 (OpenBSD) Cancel-Lock: sha1:OYKyDDAvicJSHxaMERqf5IAgrw8= Xref: csiph.com comp.lang.php:5891 On Wed, 09 May 2012 09:56:44 +0200, Erwin Moller wrote: > On 5/9/2012 4:29 AM, Peter H. Coffin wrote: >> On Tue, 08 May 2012 22:25:26 +0200, Michael Fesser wrote: >>> .oO(Jerry Stuckle) >>> >>>> On 5/7/2012 11:37 PM, Daniel Pitts wrote: >>>>> Exactly true, but if you scale to sizes you don't need, you indeed use >>>>> more processor time! Our disk space is definitely not the bottleneck. >>>> >>>> And if you repeatedly rescale the same image to the same size, you're >>>> using even more processor time! >>> >>> You missed the word 'caching'. You rescale when needed, and only once. >> >> How is this different than pre-scaling the images? >> > > Hi Peter, > > It is different because they are *only* rescaled when not found. > > One approach I used: > > 1) Need image xyz_2012_march_nr12_300x500.jpg > (The 300x500 is dimensions needed.) > 2) Check if it exists. > If not: Create it out of original (xyz_2012_march_nr12.jpg in this case) > and store it. > > One can easily wrap this functionality in a function. > > So the difference is that you don't need a batchjob that apparently > needs months and that will resize many images that are never needed, or > never needed on that size. > (I have my doubts about the alleged months, but that doesn't matter.) Still seems a waste to use webserver CPU to do something that's apparently time-critical and intensive to do what could be handled as part of a production build. I mean, don't you KNOW what size image you're going to need? Will you suddenly need xyz_2012_march_nr12_318x1260.jpg ? Or are you working around someone just forgetting to build something that IS known about and should be part of a documented process? -- _ o |/)