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
  #32  
Old 01-26-2006, 04:10 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chris-777
One thing that'd be nice to add is a switch in the ACP for "show to admins only" that would toggle the conditional. I'm a total geek about this stuff and I like to see it all, but my members are mostly saying "What the heck is that stuff down below?"
That could be done.
Noted for the next update


Quote:
Originally Posted by Zia
but asking... this one remove white spcace....
& realtime temp. compressor...compress maybe not remove white space...
can u modify it...bit more........
something similliar two in one....
Not sure if I'm getting you there....
What do you want to be able to turn ON/OFF?
Making striping leading whitespace as option?


Quote:
Originally Posted by XtAzY
nice but i like the compression for the first release, the new update one decreases very slightly

its prob because my css is used externally
That's weird.
Shouldn't have any effect if the CSS are external....
Do you have comments with "[" in it? 'cause those are left allone now to asure AnyMedia will not screwed up.
(I'm trying to do a better RegEx for that anyway....)
Reply With Quote
  #33  
Old 01-26-2006, 04:27 AM
Lizard King Lizard King is offline
 
Join Date: Jan 2005
Location: Mersin
Posts: 907
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hellcat
That could be done.
Noted for the next update



Not sure if I'm getting you there....
What do you want to be able to turn ON/OFF?
Making striping leading whitespace as option?



That's weird.
Shouldn't have any effect if the CSS are external....
Do you have comments with "[" in it? 'cause those are left allone now to asure AnyMedia will not screwed up.
(I'm trying to do a better RegEx for that anyway....)
I also have my CSS external so i think currently there is a problem.
Reply With Quote
  #34  
Old 01-26-2006, 05:17 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the css is posted when the headinclude variable is parsed which should be before this outputs?
Reply With Quote
  #35  
Old 01-26-2006, 07:29 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 99SIVTEC
the css is posted when the headinclude variable is parsed which should be before this outputs?
Yep.
The compressor kicks in when all parsing and HTML building is done, just before the actual output is send to the browser.

I also put the CSS on my test system into external files -> no problem there.
Still getting good results. (around ~13%).


Quote:
Originally Posted by XtAzY
nice but i like the compression for the first release, the new update one decreases very slightly
By looking at the code changes the only explanation I have for this is the comments containing "[" - I'd guess you have some of those.... have you?


@Lizard King
By looking at the source of your pages it looks like they ARE propperly compressed.
There's no whitespace, linebreaks or comments left that are supposed to go.

Maybe only the DISPLAY is of....

Could that be caused by vbSEO???
With the 1.00 everthing was fine?

It's getting more and more weird....
But I'm still on it!
Reply With Quote
  #36  
Old 01-26-2006, 07:33 AM
Lizard King Lizard King is offline
 
Join Date: Jan 2005
Location: Mersin
Posts: 907
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hellcat
Yep.
The compressor kicks in when all parsing and HTML building is done, just before the actual output is send to the browser.

I also put the CSS on my test system into external files -> no problem there.
Still getting good results. (around ~13%).



By looking at the code changes the only explanation I have for this is the comments containing "[" - I'd guess you have some of those.... have you?


@Lizard King
By looking at the source of your pages it looks like they ARE propperly compressed.
There's no whitespace, linebreaks or comments left that are supposed to go.

Maybe only the DISPLAY is of....

Could that be caused by vbSEO???
With the 1.00 everthing was fine?

It's getting more and more weird....
But I'm still on it!
I will probably upgrade vbseo today. While the upgrade process , i will disable vbseo and check if the problem is about vbseo but the first version worked pretty good with me. If you still have the first version i may try with it also.
Reply With Quote
  #37  
Old 01-26-2006, 07:40 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attached is the previous version:
Reply With Quote
  #38  
Old 01-26-2006, 08:02 AM
Martin Martin is offline
 
Join Date: Jan 2002
Location: Honolulu
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

7-19%

excellent job
Reply With Quote
  #39  
Old 01-26-2006, 09:01 AM
Snatch Snatch is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Job 7-17%
Reply With Quote
  #40  
Old 01-26-2006, 09:11 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hellcat
By looking at the code changes the only explanation I have for this is the comments containing "[" - I'd guess you have some of those.... have you?
HAAA HAAA
I think I found the reason for the slight drop....
During my last experiments I hit F5 a thousand times (OK, a few times less than 1000 ) and with the same page reloading (and no changes to the code in the meantime) the ratio went a bit down and up again.

vB seems to put the one or the other linebreak or comment more into the page's source from time to time.

So, nothin' to worry about a percent drop, it'll come back soon
Reply With Quote
  #41  
Old 01-26-2006, 09:38 AM
klaush klaush is offline
 
Join Date: Oct 2005
Posts: 340
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, great, great!!!

Thanks a lot!
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 02:08 AM.


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.05170 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
  • (8)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
  • (1)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