FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » class gzip_encode
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
class gzip_encode [message #21618] Mon, 06 December 2004 20:50 Go to next message
srchild is currently offline  srchild   United Kingdom
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 #21620 is a reply to message #21618] Mon, 06 December 2004 21:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fudforum already offers gz compression.

FUDforum Core Developer
Re: class gzip_encode [message #21631 is a reply to message #21620] Tue, 07 December 2004 14:37 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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
Re: class gzip_encode [message #21634 is a reply to message #21618] Tue, 07 December 2004 18:51 Go to previous message
JamesS is currently offline  JamesS   United States
Messages: 275
Registered: July 2002
Location: Atlanta, GA
Karma: 0
Senior Member
Yeah, I think the only reason to even include PHP gzip support is for the users that don't have control of the server and can't enable mod_gzip. There is no sense in using PHP gzip support when mod_gzip is available to you.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Better Indentation in Posts?
Next Topic: RSS feed integration in a forum
Goto Forum:
  

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

Current Time: Wed Nov 27 23:14:07 GMT 2024

Total time taken to generate the page: 0.02622 seconds