Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
HELLCAT's Realtime Page Compressor Details »»
HELLCAT's Realtime Page Compressor
Version: 1.24, by Hellcat Hellcat is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-25-2006 Last Update: 02-19-2006 Installs: 422
Uses Plugins Template Edits
 
No support by the author.

This is my version of a realtime page compressor.
The idea is based on ShiningArcanine's port of the "Realtime Template Compressor", that is also based on the original concept by Logician, and can be found in this thread:
https://vborg.vbsupport.ru/showthread.php?t=83248

But since my version doesn't contain any of his original code anymore (even the regular expressions have been rewritten) and I added a bunch of new features I finally decided to release this one as a speperate thing.

Features:
  • Copmresses the final HTML output sent to the browser by ~10% to ~15%
    (see bellow for how this is achived)
  • Full controll via AdminCP options
    (you can turn it ON/OFF and choose if, and how the stats should be displayed - see screenshot)
  • Stats display can be fully customized via template edit
  • Areaes with intentional/wanted whitespace are left untouched
    (So this does not mess up user inputted text, text in [code] blocks and the such....)
  • JavaScript blocks are kept intact and functional

What does this exately do?
This plugin strips all unneccesary whitespace, linebreaks and HTML comments out of the final HTML code that vBulletin sends to the browser.
This way the pages get a bit smaller (saving bandwidth) and the browser often renders the pages faster since there's no whitespace it must skip.

Passages that are enclosed by <pre> and <textarea> tags are left untouched completely so text posted in [code], [php] and other bb-tags of that sort are not affected and kept like the user intended them to be.
Passages enclosed in <script> tags are only striped from leading whitspace but not of linebreaks - this way JavaScript (and other) code will remain functional and does not get messed up.


How to install
Couldn't be more easy.
If you have any other page/template complression tool installed -> uninstall it first.

Then go to "AdminCP -> Product Manager -> Add/Import product" and import the .XML you downloaded here.

Now go to the "vBulletin Options" in the AdminCP, under "Help Server Settings and Optimization Options" you will find the "Realtime Page Compressor Options" settings group.
Open the settings, change them to what you want and hit "SAVE"
(It's important that you SAVE the options even when you want to use the defaults! For vB to actually create theese settings in the DB they have to be saved at least once!!!)

Done

More details are in the README.


Have fun!


UPDATE 1.10
Not a day old and here comes the first update
  • Added compatibility for the "Any Media BB Code"
    Before the Any Media BB Code was screwed up in IE when the compressor was active -> FIXED
  • Raised compresseion ratio another 1 to 3 percent
    "Code comments" (stuff between "/*" and "*/" - used in CSS and JS for example) are now striped as well.

Update 1.20
  • Added the option to show the stats display to admins only.
    Go to "AdminCP -> vBulletin Options -> Real Time Compressor Settings" and you will find the new option there.
  • Fixed the "uncached template" issue
  • Tweaked the RegEx' a bit more
    But they still need quite some optimization/tweaking

Update 1.21
  • Added HTML tag to exclude blocks from compression
    Put blocks of HTML source between <nocompress>Your Source</nocompress> tags to have it untouched by the page compression.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #122  
Old 02-10-2006, 04:44 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a little report for anyone wondering as i was, this is running on www.stuntlife.com/forums/index.php and here are the results.

Currently zlib compression is on in the admincp at lvl 1, plugin off, results:
Original Size: 99 K
Gzipped Size: 16 K
Data Savings: 83.84%

Zlib and Plugin active:
Original Size: 91 K
Gzipped Size: 15 K
Data Savings: 83.52%

Average of 10% saving with plugin active on the main index page of the forums.

I wanted to report as this is a very effective addon, this is a very active site, some stats Threads: 140,204, Posts: 1,807,586, Members: 38,525 so if anyone is wondering about its effectiveness, they shouldn't have to, great job HellCat, thanx very much, the owner of stuntlife appreciates it very much.

Added Note: Page laod times have NOT changed, still between 1.5 - 2.5 after adding the plugin.
Reply With Quote
  #123  
Old 02-11-2006, 04:12 PM
dethfire dethfire is offline
 
Join Date: Feb 2003
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by snakes1100
Just a little report for anyone wondering as i was, this is running on www.stuntlife.com/forums/index.php and here are the results.

Currently zlib compression is on in the admincp at lvl 1, plugin off, results:
Original Size: 99 K
Gzipped Size: 16 K
Data Savings: 83.84%

Zlib and Plugin active:
Original Size: 91 K
Gzipped Size: 15 K
Data Savings: 83.52%

Average of 10% saving with plugin active on the main index page of the forums.

I wanted to report as this is a very effective addon, this is a very active site, some stats Threads: 140,204, Posts: 1,807,586, Members: 38,525 so if anyone is wondering about its effectiveness, they shouldn't have to, great job HellCat, thanx very much, the owner of stuntlife appreciates it very much.

Added Note: Page laod times have NOT changed, still between 1.5 - 2.5 after adding the plugin.
how do you figure out the gzip savings?
Reply With Quote
  #124  
Old 02-12-2006, 03:11 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by snakes1100
Just a little report for anyone wondering as i was, this is running on www.stuntlife.com/forums/index.php and here are the results.

Currently zlib compression is on in the admincp at lvl 1, plugin off, results:
Original Size: 99 K
Gzipped Size: 16 K
Data Savings: 83.84%

Zlib and Plugin active:
Original Size: 91 K
Gzipped Size: 15 K
Data Savings: 83.52%

Average of 10% saving with plugin active on the main index page of the forums.

I wanted to report as this is a very effective addon, this is a very active site, some stats Threads: 140,204, Posts: 1,807,586, Members: 38,525 so if anyone is wondering about its effectiveness, they shouldn't have to, great job HellCat, thanx very much, the owner of stuntlife appreciates it very much.

Added Note: Page laod times have NOT changed, still between 1.5 - 2.5 after adding the plugin.

Yeap me too wondering....how u defined Zlib & Gzip ststuas?
Reply With Quote
  #125  
Old 02-12-2006, 10:40 AM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dude nice lil html function, im just getting into editing vbulletin forums.. damn its addtive!
Reply With Quote
  #126  
Old 02-13-2006, 09:37 PM
dethfire dethfire is offline
 
Join Date: Feb 2003
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fatal error: Cannot redeclare cb_script() (previously declared in /home/musicban/public_html/includes/functions.php(4320) : eval()'d code:114) in /home/musicban/public_html/includes/functions.php(4320) : eval()'d code on line 7
Reply With Quote
  #127  
Old 02-14-2006, 03:41 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dethfire
Fatal error: Cannot redeclare cb_script() (previously declared in /home/musicban/public_html/includes/functions.php(4320) : eval()'d code:114) in /home/musicban/public_html/includes/functions.php(4320) : eval()'d code on line 7
Are you using it together with Trigunflame's template compressor?
Reply With Quote
  #128  
Old 02-14-2006, 01:23 PM
Gripemaster Gripemaster is offline
 
Join Date: Oct 2005
Location: MD
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice!!! *Clicks Install*
Reply With Quote
  #129  
Old 02-15-2006, 08:47 AM
Borimikan Borimikan is offline
 
Join Date: Apr 2005
Location: Brooklyn, NY
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great job i got 9.60%!!
Reply With Quote
  #130  
Old 02-15-2006, 08:56 AM
dbembibre's Avatar
dbembibre dbembibre is offline
 
Join Date: Sep 2004
Location: Madrid (Spain)
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lizard King
Working pretty good but you have an uncached template "pagecompressor_stats".

Edit : I cache this template as i always did to other templates but it didn't work. I forget the "s" in the end Perfect hack
Hey Lizard, this plugin work well with the geek auto link ?
Reply With Quote
  #131  
Old 02-15-2006, 09:16 PM
BillP BillP is offline
 
Join Date: Nov 2001
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm testing this compressor, and I'm having a very hard time reconciling the statistics generated by the compressor (as shown to me on the bottom of every page) to the real size of the page.

I am using FireFox with the Web Developer Toolbar, which offers a quick summary of the space used on a page.

The document itself (the HTML for that page, less all external data such as images, CSS, etc.) is the only thing that gets compressed, and that's correct, but I am seeing around 10% savings, but the stats consistently say 22% or so savings.

I'll keep staring at the calculations, but I think the stats are not accurate.

I wonder if Firefox is measuring the GZipped output? My server uses gzip everywhere, and the stats are definitely calculated pre-gzip, the difference could be in the exploded/deflated sizes.

I don't see that I'll be able to measure the true bandwidth savings, as 10% on a page is meaningless compared to the images and CSS that go along with it. For example, my forums home page has 9K of data, 46K of images, 1K of style sheets, and 13K of scripts (vbulletin_global.js, for example). The stats say that my page compression was: [page compression: 65.53 k/84.13 k (22.11%)]

If I turn off the page compression, the document increases from 9K to 10K, all other stuff remains the same, so Firefox reports a 71K page.

I just can't reconcile this. Can anyone else see similar results?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05353 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete