![]() |
HELLCAT's Realtime Page Compressor
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:
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 ;)
Update 1.20
Update 1.21
|
Installed 3.5.3 averaging 10% - 15% savings
|
Quote:
|
It alters the output, it does not touch pre-rendered templates.
Dave |
This is amazing, it goes from 9 - 14 % here...
Good job!! [high]* The Chief clicks install [/high] It would be awesome if you could try something like this for the vB Drupal extension, like an add-on or something :) |
Wow thanks!
|
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 :p Perfect hack |
/me clicks install
i <3 hellcat |
This works really good, and so simple to install, many thanks for this :)
|
thank you
Makaveli installs :D |
Glad you like it :)
And there goes the first update already :D (read release post above for details) To Upgrade: Just import the new .XML and be sure to check the "Allow overwrite" option! :) Quote:
Seems not perfectly integrated, it didn't even use my customized templates from the style I had running :D And it doesn't fire the vB hooks, so no compression there (yet). But I might look deeper into this when I get the time. |
HOLLY SHIT
How Could I have missed it...Damn To me... Many thanks & Well wishes to HELLCAT' Its really amagiz thing.... Kliks Install |
Works great. Saved almost 40 percent on some pages of my test site.
|
Quote:
|
Quote:
wow man..... whats ur site???? |
Quote:
asking again...i must uninstall that? b4 install it? should both 2 hack compress more?? (may be a fools qus) sorry..but askin..im too curious.... thnx |
it's almost a complete rewrite of vbulletin, thousands of file edits, changed templates, etc. We have lots of commented code in various places while we are in development. the site is almost ready for prime time, then i'll post a link (we launch the first beta tomorrow)
Quote:
|
I dont know what you changed in the new version but the new version is way worse then the old one. The compression level is down to 1%
forumhome : [page compression: 87.79 k/89.21 k (1.59%)] forumdisplay : [page compression: 115.41 k/116.54 k (0.97%)] showthread : [page compression: 168.07 k/169.85 k (1.05%)] |
im using both 2 hack...
realtime template compressor & this one in testsite Quote:
result is it.........ummm what abt using both together? i dont know abt it using both...creating probs or not want xperts opinion .. |
Quote:
Quote:
I'm getting almost ~20% on my test install. Can you take a look at the generated source code and see if there's any comments left or something? Maybe even send me a copy of that HTML page (the source of it)? |
Quote:
|
ummm
getting 20%.. http://golpo.net/devsite is our test site........ [Output: 19.15 Kb. compressed to 18.25 Kb. by saving 0.90 Kb. (4.72%)] [page compression: 16.19 k/18.38 k (11.92%)] in forum home getting it.. |
[page compression: 76.49 k/89.26 k (14.31%)]
Hellcat, you rock sir. AnyMedia is fixed, and so far I can't find anything that's not as it should be. [high]* Guest210212002 cheers and mashes the install button with viking-esque fury! [/high] 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?" :D |
in forum home...only using it
result...is it.. [page compression: 16.06 k/19.15 k (16.16%)] who is getting the highest compression ?? for sure not the coder himself..hhe he should always get the highest out put |
Quote:
check it out, http://www.myetalk.com/forums |
Quote:
i've been also doing some checks on my side and i get the same results with Opera , FF 1.5 and IE 6 |
Quote:
oh yeah u r getting more compression in forum inside... [page compression: 66.74 k/75.63 k (11.75%)] while forum home is ~9.5% Not bad..its good.... |
Dear Hellcat
hope not bothering u..... 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.... |
Installed and worked as described Clicks Install.
Thanks Hellcat |
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 |
Quote:
Noted for the next update :) Quote:
What do you want to be able to turn ON/OFF? Making striping leading whitespace as option? Quote:
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....) |
Quote:
|
the css is posted when the headinclude variable is parsed which should be before this outputs?
|
Quote:
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:
@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.... :confused: 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! |
Quote:
|
Attached is the previous version:
|
7-19%
excellent job :) |
Great Job 7-17%
|
Quote:
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 ;) |
Great, great, great!!!
Thanks a lot! |
All times are GMT. The time now is 06:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|