Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Plugin Based Template Cache Details »»
Plugin Based Template Cache
Version: 1.0.3, by orban orban is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.6.0 Rating:
Released: 07-22-2006 Last Update: Never Installs: 153
Uses Plugins
Additional Files  
No support by the author.

Removed on author's request.

Show Your Support

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

Comments
  #152  
Old 11-12-2006, 11:43 PM
Milez Milez is offline
 
Join Date: Jan 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack is giving me hope as my very large board often succumbs to slow page loads during very busy times. I just read thru every post in this thread as well as the old 3.5.x thread and there is not a whole lot of success stories listed.

Has anyone noticed significant speed ups on big boards? I would love to hear some specifics on this before I install. I am currently running eAccel so this hack might be a good fit for me.

BTW the support from orban is phenomenal. Props.
Reply With Quote
  #153  
Old 11-13-2006, 04:37 AM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milez View Post
This hack is giving me hope as my very large board often succumbs to slow page loads during very busy times. I just read thru every post in this thread as well as the old 3.5.x thread and there is not a whole lot of success stories listed.

Has anyone noticed significant speed ups on big boards? I would love to hear some specifics on this before I install. I am currently running eAccel so this hack might be a good fit for me.

BTW the support from orban is phenomenal. Props.
I'm running a (rather) big board myself (1.5 million posts) and I did/do notice a huge performance improvement.

Quote:
Originally Posted by nix View Post
Any answer to this one? Like he said its commented out right now. Should we uncomment this? Or is this basically what the hack does?
The datastore value in config.php has nothing to do with templates or this addon.
Reply With Quote
  #154  
Old 11-13-2006, 04:55 AM
nix's Avatar
nix nix is offline
 
Join Date: Mar 2005
Posts: 975
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban View Post



The datastore value in config.php has nothing to do with templates or this addon.
Do you think it would help/hurt to turn that on also?
Reply With Quote
  #155  
Old 11-13-2006, 05:34 AM
amcd amcd is offline
 
Join Date: Oct 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nix View Post
Do you think it would help/hurt to turn that on also?
it would certainly help
Reply With Quote
  #156  
Old 11-15-2006, 01:44 PM
beano33 beano33 is offline
 
Join Date: Feb 2003
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milez View Post
Has anyone noticed significant speed ups on big boards? I would love to hear some specifics on this before I install. I am currently running eAccel so this hack might be a good fit for me.
VERY nice, people. We run an extremely busy board, with 6 load-balanced webservers and frequently 2000+ visitors... Watching the slow query log on the MySQL server was painful, since the template query often took more than 6 seconds on a very fast server, and of course, that slowed things down significantly, even causing the SQL server to drop other connections, etc.

This "hack" has made our board a LOT faster, and it's really appreciated. We're running it over NFS, and at first, since NFS doesn't support file locks, we were having some problems, since 0-byte files were being created. However, I found that a crude hack to fix that problem worked well... And for others who have the same problem, here's the crude hack that will fix it:

Replace the following line (around line 29 in 1.03):
Code:
if (file_exists($templatefile))
with
Code:
if (file_exists($templatefile) && filesize($templatefile) != 0)
Pretty simple, but it works. Basically, if the file is a zero-byte file, it will recreate it. If it's not... It won't.

Anyhow, that will fix the little problem created by file-locking if you're running NFS and getting zero-byte files.

And I'd HIGHLY recommend this to anyone who's been watching their slow-query log on their SQL server and getting frustrated with how that damn "SELECT title, template" keeps showing up in their logs. Get it, install it, your worries are over.

As for the datastore, I'd highly recommend that you get memcached set up and installed, that will provide a HUGE boost as well.
Reply With Quote
  #157  
Old 11-15-2006, 01:58 PM
Kihon Kata Kihon Kata is offline
 
Join Date: Nov 2003
Posts: 763
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by beano33 View Post
VERY nice, people. We run an extremely busy board, with 6 load-balanced webservers and frequently 2000+ visitors... Watching the slow query log on the MySQL server was painful, since the template query often took more than 6 seconds on a very fast server, and of course, that slowed things down significantly, even causing the SQL server to drop other connections, etc.

This "hack" has made our board a LOT faster, and it's really appreciated. We're running it over NFS, and at first, since NFS doesn't support file locks, we were having some problems, since 0-byte files were being created. However, I found that a crude hack to fix that problem worked well... And for others who have the same problem, here's the crude hack that will fix it:

Replace the following line (around line 29 in 1.03):
Code:
if (file_exists($templatefile))
with
Code:
if (file_exists($templatefile) && filesize($templatefile) != 0)
Pretty simple, but it works. Basically, if the file is a zero-byte file, it will recreate it. If it's not... It won't.

Anyhow, that will fix the little problem created by file-locking if you're running NFS and getting zero-byte files.

And I'd HIGHLY recommend this to anyone who's been watching their slow-query log on their SQL server and getting frustrated with how that damn "SELECT title, template" keeps showing up in their logs. Get it, install it, your worries are over.

As for the datastore, I'd highly recommend that you get memcached set up and installed, that will provide a HUGE boost as well.
Thanks Beano..

Orban, can you comment on this? ^^
Reply With Quote
  #158  
Old 11-15-2006, 02:16 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you wanna know

The file_exist problem is just with NFS because it often doesn't support file locking.

The memcached datastore has nothing to do with this addon, but I'd recommend it, too.
Reply With Quote
  #159  
Old 11-28-2006, 09:48 AM
ElForro ElForro is offline
 
Join Date: Mar 2006
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ths is nice... I have only one problem... I use this: https://vborg.vbsupport.ru/showthread.php?t=122594

But with the PLugin Based Template Cache on, the table with the "users who read the thread" doesn't shows. Does anybody knows how could I use both plugins at the same time?
Reply With Quote
  #160  
Old 11-28-2006, 11:27 AM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to exclude SHOWTHREAD from being cached (in the options)

OR

edit the "showthread_getinfo [Display Thread Readers (3)]" plugin and change

$vbulletin->templatecache['SHOWTHREAD'] = str_replace($vbulletin->options['text_wrt'], $vbulletin->options['text_wrt'].$vbulletin->templatecache['Display_Readers'],$vbulletin->templatecache['SHOWTHREAD']);

to

eval('$wrt_template = "' . fetch_template('Display_Readers') . '";');

and then edit the "SHOWTHREAD" template and add

$wrt_template after

"<!-- end currently active users -->"

so you end up with

"<!-- end currently active users --> $wrt_template"

The second part is untested and if you don't know PHP/vB template system don't try this, but the performance will be a lot better.
Reply With Quote
  #161  
Old 11-28-2006, 12:04 PM
ElForro ElForro is offline
 
Join Date: Mar 2006
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! I edited the plugin and SHOWTHREAD and works fine!
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 04:51 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.09122 seconds
  • Memory Usage 2,320KB
  • 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_code
  • (6)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
  • (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