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

Reply
 
Thread Tools
Load templates from XCache Details »»
Load templates from XCache
Version: 1.0.0 Beta, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.1.0 Rating:
Released: 12-26-2010 Last Update: 01-05-2011 Installs: 36
DB Changes
Additional Files Is in Beta Stage  
No support by the author.

By default vBulletin loads templates out of the database which means that all templates that are required on a page must be loaded ("cached") before the first template gets rendered.

If a template is not cached an additional dataase query is required.

This Add-on loads templates from XCache on demand, completely emiminating the need for database reads after an initial pageload.

By loading templates on demand only those templates that are really being used on a page will be loaded into memory, so theoretically this Add-on should
  • Decrease memory footprint
  • Decrease page creation time (as loading data from a shared memory storage like XCache is faster than DB access)
  • Remove 1+X (X = amount of uncached templates) queries per page

How is that different to other existing tools like vBOptimise?
Most existing tools (at least the ones I know of) load all templates upfront, just like vBulletin would do if the DB is used.
This means that only those templates that are explicitly cached will be loaded from the cache, uncahed templates will cause additional database queries.

Can I use this Add-on my hared Webhosting?
Most likely not as it requires XCache with variable caching enabled which is usually not the case on shared hosts

I use multiple webservers, is that a problem?
It should work just fine with multiple webservers but that has not been tested so far.

Are there any other drawbacks?
Yes, this Add-on might be (be is not necessarily) incompatible with Add-ons that manipulate the template cache at runtime (which is a technique that is genreally deprecated).

History
1.0.0 Beta 1
First Public Release

1.0.0 Beta 2
  • Fixed incorrect variable initialisation that caused problems with other Add-ons that manipulate the template cache
    Important: Such techniques (like using str_replace(), etc.) are deprecated and it is strongly advised not to use Add-ons that do such auto-template changes.
  • Increased Plug-in execution order to the maximum to ensure all Templates cached via Plug-ins are grabbed

1.0.0 Beta 3
  • Fixed missing global in Hook template_compile
  • Added prefix setting to config.php

Download Now

File Type: zip xcachtemplates_1-0-0_Beta_1.zip (3.6 KB, 49 views)
File Type: zip xcachtemplates_1-0-0_Beta_2.zip (3.9 KB, 41 views)
File Type: zip xcachtemplates_1-0-0_Beta_3.zip (3.7 KB, 340 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
cherylferraro

Comments
  #12  
Old 12-29-2010, 08:37 PM
rajubd rajubd is offline
 
Join Date: Jun 2009
Posts: 209
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by demonfatal View Post
This can be used with vBOptimise without conflict?
i don't know why vBOptimise incresing my server load. when i disable it server running well after apply it it goes high. this mod behave same like vboptimise?
Reply With Quote
  #13  
Old 12-31-2010, 01:45 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please consider to release a vb 3.8 version.
Reply With Quote
  #14  
Old 12-31-2010, 03:28 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No way, 3.8 is outdated
Reply With Quote
  #15  
Old 12-31-2010, 03:42 PM
Shamil. Shamil. is offline
 
Join Date: Sep 2008
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's the benefit of this, over loading it from disk?
Reply With Quote
  #16  
Old 12-31-2010, 03:58 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Andreas View Post
No way, 3.8 is outdated
Haha, maybe true, but vb4 isnt ready yet. Im only using vb4 for smaller sites.
Reply With Quote
  #17  
Old 01-06-2011, 08:21 PM
rob01 rob01 is offline
 
Join Date: Sep 2008
Location: Mexico
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cant use XCache

shared hosting :S
Reply With Quote
  #18  
Old 01-08-2011, 03:26 AM
ImmortalForums ImmortalForums is offline
 
Join Date: Feb 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a benefit it running this with vboptimise as vboptimise puts them into xcache or any other cache system you are using?

I did some tests with this on with vb vboptimise page load speeds are identical but this causes one more query. Without looking into the code I am going to assume you are doing the exact same thing as vboptimise.

Also they can not run together as then no templates get cached.
Reply With Quote
  #19  
Old 01-08-2011, 06:44 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ImmortalForums View Post
Is there a benefit it running this with vboptimise as vboptimise puts them into xcache or any other cache system you are using?
If it is possible to tell vBOptimise not to cache templates - yes.
If it always does - no.

Quote:
Without looking into the code I am going to assume you are doing the exact same thing as vboptimise.
No. vBOptimise does precache all templates that are set to be cached on hook cache_templates (+ a few more once that are normally not cached).
This Add-on caches Templates purely on demand, it does not precache any templates which gives you two advantages:
  • Only those templates that are actually being used are cached
  • There won't be any uncached templates at all (which AFAIK can still happen with vBOptimise)
Reply With Quote
  #20  
Old 01-08-2011, 06:59 PM
Robru Robru is offline
 
Join Date: Aug 2005
Location: Netherlands
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sharing this, it's very useful
Reply With Quote
  #21  
Old 01-08-2011, 11:11 PM
ImmortalForums ImmortalForums is offline
 
Join Date: Feb 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have disabled optimize cache of templates and will see how this compares in a couple of days and see if stats show anything.
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 07:50 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.06903 seconds
  • Memory Usage 2,338KB
  • Queries Executed 26 (?)
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
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete