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 #178243 is a reply to message #178240] Thu, 24 May 2012 13:12 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 5/24/2012 6:00 AM, Shake wrote:
> El 24/05/2012 11:40, Stig Vestøl escribió:
>>
>> That was the point i was trying to make. If performance is an issue, let
>> apache serve the images.
>> The overhead of using PHP to check if an image exists before sending it
>> on every request is huge.
>
> There is no need to check every request.
>
> Check the process:
>
> Supose that the images are on the home of the image gallery:
>
> GET /Index.php -> served by PHP (by Apache) *
> GET /scaleY/image1.png -> served by Apache (or LIGHTTP) **
> GET /scaleY/image2.png -> served by Apache (or LIGHTTP) **
> GET /scaleY/image3.png -> served by Apache (or LIGHTTP) **
> GET /scaleY/image4.png -> served by Apache (or LIGHTTP) **
> GET /scaleY/image5.png -> served by Apache (or LIGHTTP) **
>
> *
> Index.php check image files... If one of the images doesn't exists, it
> generates.
> If all images exists, no matters. Anyway PHP have to process index.php
> so there is no overhead beyond a "if(file_exists))" in a foreach of images.
>

Right. Someone has to check on every request whether the image exists
or not. In your case it is index.php. And although you think each test
is a small overhead, it all adds up - very quickly.

It's completely unnecessary if the images have been generated offline
and uploaded.

> **
> no PHP needed, images here had been always created.
>
>
> Can anyone access to "/scaleY/image5.png" directly ? how? from where he
> get the address?
>
> From google? (google have to had visited the index.php) Or other search
> engine? (IDEM).
>
> Rgds.

Sure they could. It's a URI, just like every other resource on the
server. And there are any number of ways of getting the URI, especially
if you're using a pattern to generate the file names.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: is_dir true from cli, false from Apache
Next Topic: in_array performance in unsorted vs sorted array
Goto Forum:
  

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

Current Time: Tue Nov 26 19:41:05 GMT 2024

Total time taken to generate the page: 0.05222 seconds