You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 371 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - GZIP Speed and Compression (It Works!) [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sun Feb 01, 2004 8:06 pm Reply with quoteBack to top

PART I - The Truth

Some ppl seem to think, "GZIP compression doesn't work with Nuke. Why even try?"

Read and heed the results for my site, using the Desilva test:


Image


85% reduction! "How about the forums? Certainly compression won't work with phpBB!"


Image


83% reduction! "But.. but... I run Coppermine. Pictures are already compressed, right?"


Image


87% reduction! "But.. but... but... huh?"


Leknor Test:

Image


PhiliWeb Test:

Image


PipeBoost Test:

Image



May I suggest you go check your site for GZIP compression? Wink

Here are some links where you can test it...

http://www.desilva.biz/gzip-test.php

http://leknor.com/code/gziped.php

http://www.philiweb.com/accueil.php?pn=utile/testgzip.php

http://www.pipeboost.com/report.asp

To the naysayers amongst us:

Go check my site ( www.lenon.com ) using these widely accepted and highly recommended 'industry standard' GZIP compression checkers before posting here. That might change your mind[s] on this topic in advance. Cool

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.

Last edited by VinDSL on Mon Feb 23, 2004 2:31 am; edited 2 times in total
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sun Feb 22, 2004 10:50 pm Reply with quoteBack to top

PART II - The Forrest Gump Code
" Life is like a box o' chocolates..."

Here's what I do...

Replace this code at the top of 'mainfile.php':

Code:
(snip)

$phpver = phpversion();
if ($phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible')) {
    if (extension_loaded('zlib')) {
        ob_end_clean();
        ob_start('ob_gzhandler');
    }
} else if ($phpver > '4.0') {
    if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
        if (extension_loaded('zlib')) {
            $do_gzip_compress = TRUE;
            ob_start();
            ob_implicit_flush(0);
            //header('Content-Encoding: gzip');
        }
    }
}

(snip)



...with:


Code:
(snip)

$phpver = phpversion();
if ($phpver >= '4.0.4pl1')
{
    ob_start('ob_gzhandler');
    }else if ($phpver > '4.0'){
    if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')){
        if (extension_loaded('zlib')){
            $do_gzip_compress = TRUE;
            ob_start();
            ob_implicit_flush(0);
            }
        }
    }

(snip)



"Stupid is as Stupid does, Sir...

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sun Feb 22, 2004 11:07 pm Reply with quoteBack to top

EPILOGUE

Henrick wrote:
Hi there..

I figured this might be the best forum to post this in. I noticed you using the gentime add-on here on lenon.com. I saw a post over at nukecops from you talking about some modifications you were possibly making to it. Are you going to ever make available a VinDSLfied version? The reason I ask is that I really like this add-on and would love to see if updated, not that its not working of course. Smile

Thanks,

-Henrick


VinDSL wrote:
Hi, Henrick,

Yes, I'll be releasing this hack in the future, but I'm not sure what direction it will take at this juncture.

I'm trying to tie this into a GZIP compression model for Nuke websites; however there seems to be a lot of resistance to this idea because of failures by others to accomplish this in the past. I think I've come up with a simple solution to this brouhaha, but the jury is still out, so to speak.

So, it's yet to be seen if I will be able convince enough ppl to make this a worthwhile goal. I believe it is, but one never knows until they try; you know?

To give you an idea of where I'm going with all this, check out this developing thread on NukeCops:
I suspect I am about to be 'jumped on' by the Nuke community with 'both feet', if the past is any indication, but we'll see... Wink

The whole reason for implementing the gentime code on this website was part of the master plan, so I hope you can appreciate where I'm 'coming from' on this. If nothing else, I will release the gentime hack separate from the compression code, but I'm not willing to give up on the larger ideal yet... Twisted Evil


Henrick wrote:
Thanks for the response. Wow.. I had never used gzip as I have always read it was bad.. you don't need it, it doesn't make a difference yada yada yada.. but I have to say I turned it on.. and it makes a world of difference. I actually turned on it because of another post I read on Nuke Cops, which I believe you were on, where a test site was posted to run against a site after enabling gzip. You posted your workaround and a ton of comments and off I went. Smile

I can see where people are coming from on the compatibility thing but there seems to be always something you can do to work around things like this.. I seem to remember when frame pages were super popular a really long time ago and the push back then was 'certain browsers dont handle it correctly' well they worked around those things and it can be done here as well. I know thats probably a poor example but a simple comparision. Smile

As for the gentime code.. Good to hear it and Im looking forward to it. Im in no hurry mind you, just thought I would ask, but considering the other work you have done on themes and MS Analysis blocks Im sure its worth the wait.

Take care and good luck

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
kipuka
Sergeant
Sergeant


Joined: Dec 19, 2003
Posts: 105


PostPosted: Mon Feb 23, 2004 12:57 am Reply with quoteBack to top

As previously said, doing header tests alone can give fake results on gzip tests. It does little good if your server sends the correct headers but does not compress the files before sending. If you want to prove your point, then why not post undoctored before and after log entries for everything on each page. This will show if there really is a bandwidth savings and by how much.

FYI, there isn't many ways to check a header. Posting from different sites which are using the same techniques doesn't lend any more credibility to your argument. It's very easy to create one of these so called "'industry standard' GZIP compression checkers". All they do is show the headers are being sent out correctly and use some math to figure out the savings. Why don't you post your logs to show everything on those pages actually went out 83%+ compressed. Use only pages from Nuke though not PhpBB or Coppermine. You may be in for a surprise.
Find all posts by kipukaView user's profileSend private message
badger
Sergeant
Sergeant


Joined: Apr 02, 2003
Posts: 113

Location: Scotland

PostPosted: Mon Feb 23, 2004 1:12 am Reply with quoteBack to top

erm, correct me if I'm wrong here, but I thought that nuke utilises gzip as standard if available on your server??

_________________
The Audio Recording Centre
http://www.audio-recording.co.uk
Find all posts by badgerView user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Mon Feb 23, 2004 2:38 am Reply with quoteBack to top

kipuka wrote:
...It's very easy to create one of these so called "'industry standard' GZIP compression checkers". All they do is show the headers are being sent out correctly and use some math to figure out the savings...

Cool, kipuka! How about about pointing me toward some of that code? I'd like to put a GZIP compression checker on my site. An HTML checker, like Philippe uses would be nice. I don't care about measuring external files (images,etc)...

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Mon Feb 23, 2004 2:51 am Reply with quoteBack to top

badger wrote:
erm, correct me if I'm wrong here, but I thought that nuke utilises gzip as standard if available on your server??

You're probably correct, but the original code never worked for me. Does it work for you?

EDIT: LoL! Never mind, badger. I just checked your site and it's compressed. I guess it must have worked for you...

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
biersack
Nuke Cadet
Nuke Cadet


Joined: Dec 04, 2003
Posts: 5


PostPosted: Mon Feb 23, 2004 5:20 am Reply with quoteBack to top

It works but sometimes I have problem in forum an any other module... Rolling Eyes
Could'nt compression be actived by module? Question
Find all posts by biersackView user's profileSend private message
luchtzak
Support Mod
Support Mod


Joined: Mar 19, 2003
Posts: 308


PostPosted: Mon Feb 23, 2004 6:01 am Reply with quoteBack to top

I applied your trick, noticed some faster loads Cool

_________________
Luchtzak Aviation - Snookerforum Belgium
Find all posts by luchtzakView user's profileSend private messageVisit poster's website
Tank863
Lieutenant
Lieutenant


Joined: Feb 21, 2003
Posts: 195

Location: Philadelphia

PostPosted: Mon Feb 23, 2004 6:31 am Reply with quoteBack to top

Is that all you have to do to get gzip to work?

WHen I did the test from the test site above it said my site was gzipped...
Find all posts by Tank863View user's profileSend private messageVisit poster's websiteICQ Number
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Mon Feb 23, 2004 7:11 am Reply with quoteBack to top

GZip is a very big component to increasing speed including other external things to php-nuke like zend optimizer, and mod_expires (for image caching).

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Mesum
Support Staff
Support Staff


Joined: Mar 11, 2003
Posts: 842

Location: Chicago

PostPosted: Tue Mar 09, 2004 9:56 pm Reply with quoteBack to top

So let me bring this topic back up. Does this feature helps the site or no? I have noticed (using those URLs) that NC does not use GZIP compression.

_________________
Only FREE Dating site for Desis.
Find all posts by MesumView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
dssripper
Sergeant
Sergeant


Joined: Mar 04, 2003
Posts: 118


PostPosted: Wed Mar 10, 2004 3:09 am Reply with quoteBack to top

Nevermind.... I am an idiot!
I guess I should learn to read *LOL*

Thanks Vin for the info!


Dss
Find all posts by dssripperView user's profileSend private message
JagaTelesin
Corporal
Corporal


Joined: Nov 30, 2003
Posts: 56


PostPosted: Wed Mar 17, 2004 12:52 am Reply with quoteBack to top

FYI, I did a writeup on site compression and caching a couple months ago. In it I demonstrated both the ability to GZIP compress every page on my PHP-Nuke site, in addition to caching them server-side. I also showed how block content could be cached, to further speed site responsiveness.

The methodology was marginally different from what you employed, and I can't take full credit for it. Someone else came up with the concepts for each type of compression, which I then simply extrapolated to other areas of a Nuke site (Forums, Content, etc). Even though my site is on a shared hosting server, the page sizes and responsiveness are incredibly nice. Give it a visit at http://wow.adeptshaven.com to check it out, or run any of my site's links through any compression/site checker.

I'm fairly certain the post I made is still out here somewhere - pretty sure I also put it up on http://www.portedmods.com and maybe even http://phpnuke-uk.net/.

If anyone has trouble with implementing VinDSL's method and can't seem to find what I posted after a good search, let me know out here and I'll see if I can dig up all the specifics. Regardless, it's nice to hear your solution works for you on your pages VinDSL.

EDIT: A nice site verification tool that I use frequently, can be found at: http://www.WebPageAnalyzer.com

_________________
Adepts Haven - EQ2 Fan Site (Everquest II Fansite)
Image
Find all posts by JagaTelesinView user's profileSend private messageVisit poster's website
JagaTelesin
Corporal
Corporal


Joined: Nov 30, 2003
Posts: 56


PostPosted: Wed Mar 17, 2004 1:42 am Reply with quoteBack to top

For reference, my post in December about how to accomplish a fully compressed, cached, and fast PHP-Nuke site:

http://www.nukecops.com/postt17194.html

_________________
Adepts Haven - EQ2 Fan Site (Everquest II Fansite)
Image
Find all posts by JagaTelesinView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.050 Seconds - 294 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::