ID:               48403
 User updated by:  gregor at hostgis dot com
 Reported By:      gregor at hostgis dot com
 Status:           Bogus
 Bug Type:         Performance problem
 Operating System: Linux
 PHP Version:      5.2.9
 New Comment:

> This proves it's not bug:
> run from shell - 14 seconds
> PHP on CLI - 14 seconds

I disagree. It means that the bug is evident only when running under
the webserver, which introduces a few more variables.


> And since you're using 3rd party extensions (Zend Optimizer)
>  -> bogus. Please contact Zend for support.

I have disabled Zend Optimizer. It had no effect on the times at all:
13-15 for CLI, 80-85 for the same command being run in a ten-line PHP
program.


Previous Comments:
------------------------------------------------------------------------

[2009-05-27 20:02:43] [email protected]

This proves it's not bug:
run from shell - 14 seconds
PHP on CLI - 14 seconds

And since you're using 3rd party extensions (Zend Optimizer) -> bogus.
Please contact Zend for support.

------------------------------------------------------------------------

[2009-05-27 19:43:53] gregor at hostgis dot com

> Perhaps you can provide me the same image to test with

The file is available for a short time at this URL:
   http://www.cartograph.com/images.tmp/2043.tif.gz
It's a 3 GB TIFF, but gzipped for faster download.


> Apart from different file, I did exactly same as you.

I find the result of 0.04 seconds fishy, though. I assume that you have
GDAL installed when you run the test?


> You didn't specify whether you run that test under 
> some webserver or using PHP CLI?

Here's where we get into how I narrowed it down to being something
about PHP and Apache.

run from shell - 14 seconds
PHP on CLI - 14 seconds
PHP as Apache DSO - 84 seconds
Perl CGI - 14 seconds

I would have to set up a dedicated test server in order to test other
scenarios, such as disabling Zend Optimizer or running PHP as CGI. On
our production server, those are not an option.

Note that the 14/84 test is for a shp2img using this same TIFF and a
mapfile -- the gdal_translate was <1 second to 4 seconds. I will be glad
to provide those as needed, if the gdal_translate test fails to
replicate our results on your environment.

------------------------------------------------------------------------

[2009-05-27 18:49:35] [email protected]

Perhaps you can provide me the same image to test with, I tried with 
some file I had available. Apart from different file, I did exactly
same 
as you. You didn't specify whether you run that test under some 
webserver or using PHP CLI?

------------------------------------------------------------------------

[2009-05-27 18:43:37] gregor at hostgis dot com

Hi, Jani. Thanks for looking into this so quickly. I will reciprocate
by staying on top of this with equal eagerness; we have paying customers
who would be very keen to see this fixed. I doubt that my problem is
using only 1 decimal place, as the difference between 14 seconds and 84
seconds is not a subtle one. ;)

I find your result surprising, 0.04 seconds -- do you in fact have GDAL
installed and are you manipulating a TIFF? The slowdown is with a task
that takes some time; something like "ls" is trivial.

I would be glad to provide instructions on the installation of GDAL, as
well as our test data and some other commands exhibiting this effect. I
may be able to provide a server and root access as well.

------------------------------------------------------------------------

[2009-05-27 10:26:34] [email protected]

Works fine for me. You should really use 2 decimals for the time. I got
0.044s without PHP, 0.04s with PHP..

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48403

-- 
Edit this bug report at http://bugs.php.net/?id=48403&edit=1

Reply via email to