FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Re: Windows binaries 64bit for PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Windows binaries 64bit for PHP [message #178020 is a reply to message #177996] Thu, 10 May 2012 19:01 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(Jerry Stuckle)

> On 5/10/2012 2:50 AM, Michael Fesser wrote:
>> .oO(Jerry Stuckle)
>>
>>> On 5/9/2012 6:23 PM, Michael Fesser wrote:
>>>> .oO(Jerry Stuckle)
>>>>
>>>> > OK, so you do it "on the fly" and store the result. That still takes
>>>> > more time than doing it once and forgetting it. Your way, you have to
>>>> > check on every request for the image to see if your size exists before
>>>> > deciding if you need to rescale it or not. Another unnecessary waste of
>>>> > processing time.
>>>>
>>>> You can catch that with Apache's error handling. If the image is not
>>>> found, the 404 error handler kicks in and creates it.
>>>>
>>>> Micha
>>>>
>>>
>>> Which is even more overhead...
>>
>> Wrong. The little overhead happens just once if the image doesn't exist
>> yet. After then it's just a static resource, which will be delivered
>> directly by the server.
>
> Have you actually checked how much overhead there is to process a not
> found? It is quite significant.

Even if - how often does it happen? Exactly once for every image. So
where's the problem?

In many other cases the first request causes a lot of overhead as well,
be it the initial compiling of a PHP script or the downloading of a
static resource to the client. The first request always takes the most
time. After then the data is taken from some kind of cache. And here
it's exactly the same - on the first request the image is created, after
then it's a normal static resource. In practice there's absolutely no
problem with that and no wasted CPU time.

Micha

--
http://mfesser.de/blickwinkel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: variable replacement in string
Next Topic: Re: Windows binaries 64bit for PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 13:38:12 GMT 2024

Total time taken to generate the page: 0.03886 seconds