Re: Windows binaries 64bit for PHP
- From: Stig Vestøl <stig@xxxxxxxxxxxxx>
- Date: Thu, 24 May 2012 11:40:18 +0200
On 2012-05-24 04:18:30 +0000, Jerry Stuckle said:
On 5/23/2012 4:45 PM, PlastiqueMAN wrote:On 2012-05-11 23:38:06 +0000, The Natural Philosopher said:
Shake wrote:Jerry Stuckle avait écrit le 11/05/2012 :On 5/11/2012 2:58 PM, Shake wrote:Jerry Stuckle a couché sur son écran :
Loading the script, starting the scripting module, initializing the
environment, interpreting and running the script, checking for the
presence of the image, storing a resized script if necessary, loading
the image and sending it, and cleaning up the environment.
This vs. sending the image directly via an <img ...> tag.
Nope, no extra overhead! And no way to send the image without a
script!
The Extra overhead is something like in the code that generate the
page:
<?php
if(!file_exists(IMG_PATH.$image_file)) scaleImage($image_file);
?>
Not look like an "application killer" to me.
Greetings.
There's a lot more to the overhead than that!
Which?
Is the image going to be accessed directly by its URL, or is loaded
inside a webpage? I am sure is this last case.
So Loading a PHP script will occur 99.999% if you reescaled the image
previously with a batch or not. All the work of load an script, will
be done always.
I don't believe that "react" to a 404 error is the good aproach, but
generating dinamically the scaled images when the page that show them
is required.
And this only need the few lines to test if file exists and generate
the images if not.
The fact that the image is directly accessed without pasing first for
the php script...
is hardly any CPU.
The same actions take place: the file must be opened headers
constricted and then data streamed. whether apache or PHP does this is
scarcely an issue.
Sorry to say this, but PHP compared to the default handler in Apache is
sloooooow. You can test this simply by writing a php script that copies
some large files from a directory to another and then write an identical
C program...
What do you expect - an interpreted program versus q compiled program? The compiled program will always wind.
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.
If this site we're talking about needs to serve a lot of request, I have
to agree with Jerry on this one.
Someone talked about a catalog of image... I am sure they are
accessed through a we, not directly.
Even if they are accessed via search engines, these search engines
have to visit the scripts that would generate the scaled images.
Greetings.
.
- References:
- Windows binaries 64bit for PHP
- From: Dominique Ottello
- Re: Windows binaries 64bit for PHP
- From: Arno Welzel
- Re: Windows binaries 64bit for PHP
- From: Dominique Ottello
- Re: Windows binaries 64bit for PHP
- From: Arno Welzel
- Re: Windows binaries 64bit for PHP
- From: The Natural Philosopher
- Re: Windows binaries 64bit for PHP
- From: Peter H. Coffin
- Re: Windows binaries 64bit for PHP
- From: Daniel Pitts
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Daniel Pitts
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Michael Fesser
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Michael Fesser
- Re: Windows binaries 64bit for PHP
- From: Daniel Pitts
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Daniel Pitts
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Daniel Pitts
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Michael Fesser
- Re: Windows binaries 64bit for PHP
- From: The Natural Philosopher
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Shake
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Re: Windows binaries 64bit for PHP
- From: Shake
- Re: Windows binaries 64bit for PHP
- From: The Natural Philosopher
- Re: Windows binaries 64bit for PHP
- From: PlastiqueMAN
- Re: Windows binaries 64bit for PHP
- From: Jerry Stuckle
- Windows binaries 64bit for PHP
- Prev by Date: Re: Windows binaries 64bit for PHP
- Next by Date: Re: What is this attack trying to do?
- Previous by thread: Re: Windows binaries 64bit for PHP
- Next by thread: Re: Windows binaries 64bit for PHP
- Index(es):
Relevant Pages
|