class gzip_encode [message #21618] |
Mon, 06 December 2004 20:50 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Have you thought about implementing this:
http://leknor.com/code/php/view/class.gzip_encode.php.txt
The advantage is that the compression level can be varied automatically according to server load - works for Linux and FreeBSD.
You can still set levels 0-9 if you prefer, or set 'true' to mean set autoconfigure according to server load.
Usually compressing much above level 3 or 4 doesn't make much diffference, but if you have spare cpu cycles then why not make use of them. OTOH if the server is heavily loaded then give it less compression work to do.
I've used it implemented in TYPO3 (http://typo3.org)
Simon Child
|
|
|
|
Re: class gzip_encode [message #21631 is a reply to message #21620] |
Tue, 07 December 2004 14:37 |
srchild
Messages: 88 Registered: December 2003 Location: UK
Karma: 1
|
Member |
|
|
Ilia wrote on Mon, 06 December 2004 21:40 | Fudforum already offers gz compression.
|
Yes, I'm using that. My thought was that variable compression, depending on server load, is quite neat. With Fudforum I am asked to specify a fixed compression level.
Not a big deal, just a thought.
Simon Child
|
|
|
Re: class gzip_encode [message #21632 is a reply to message #21631] |
Tue, 07 December 2004 14:40 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The difference between the time it takes to do a level 9 compression and level 0 compression when working on a 100kb or so HTML page is so insignificant it wouldn't matter for all but the slowest of servers.
For high performance we recommend NOT using the PHP based compression anyway, but rather using a much faster mod_gzip for Apache or built-in compression facilities in IIS.
FUDforum Core Developer
|
|
|
|