Re: output compression when host has disabled mod_deflate, mod_gzip and php_value auto_prepend_file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

I tested this last night. My local dev environment is under repair (Apple are more worried about their iPhones than fixing a faulty two week old retina pro) so I had to test using the hosts server.

I used the app from webperformance.com to send the requests. The web page was a simple html page with links to three css and three _javascript_ files of different sizes. I did not compress the output of the html file.

I run the test many times and file that was using output compression was faster. 

See result here http://s18.postimage.org/wczisifs9/output_compression_test.png

One thing to note, compressing the smaller files actually slowed some ofthem down e.g. the 3k stylesheet in my test case. And compressing the 1K file made it bigger. Both were expected but I was not sure at what file sizes we would see it.

Hope it help.

Regards



On 21 September 2012 19:17, Ben Johnson <ben@xxxxxxxxxxxxxxxx> wrote:


On 9/21/2012 12:44 PM, edward eric pedersson wrote:
> Thanks for your response Ben.

Sure!

> I did mean the user-agent caching. I guess I can control this using the
> PHP header output and hope the user-agent respects the header.
>
> Penalties or benefits, depends which way you look at it I guess ;-)
>
> Essentially I need to compare the cost of the two statements below
> assuming a 20K - 50K file
>
> <link rel="stylesheet"
> type="text/css" href="" href="http://my.domain.com/stylesheet.php?file=/path/to/stylesheet.css" target="_blank">http://my.domain.com/stylesheet.php?file=/path/to/stylesheet.css"/>
> <link rel="stylesheet"
> type="text/css"href="" href="http://my.domain.com/path/to/stylesheet.css" target="_blank">http://my.domain.com/path/to/stylesheet.css
> <http://my.domain.com/stylesheet.php?file=/path/to/stylesheet.css>"/>
>
> The first one uses a PHP file to get output compression (as described in
> my previous email - simply loading the file and returning it with
> compression using ob_gzhandler).
> The second does the usual.
>
> All things being equal, which one will load faster?

I'll be surprised if anyone is able to provide an authoritative answer
here. There are a number of factors that contribute to how PHP performs
in a given environment. You may just have to benchmark it.

That said, I suspect that using PHP to gzip the stylesheets will yield a
faster page-load time than not compressing them at all, given the
file-sizes you describe.

> I can try and get a few tests running but I will hold off in case anyone
> here knows already.

Please do share the results if you elect to perform benchmarking. I'm
curious :).

Thanks,

-Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




--


-- e

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux