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.5.4 Rating:
Released: 04-13-2006 Last Update: Never Installs: 55
Uses Plugins
Additional Files  
No support by the author.

3.6 Thread for Support

https://vborg.vbsupport.ru/showthread.php?t=121876

Show Your Support

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

Comments
  #192  
Old 05-17-2006, 01:37 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

While looking at the code fast ... Basically, the plugin accelerator writes all exististing installed plugins to files. Then, it reads TWICE(instead of once) ALL(instead of only the needed) newly created hook/plugin files, every time you access a forum page. In other words, you process a lot of unnecesary data. Since when reading many files in block is faster then reading a small piece of data from a database table? I might be wrong, since I only examined the class included in the plugin files... Feel free to comment on this, we are here to learn, not to put down other coders.

Why not just leave it the way it is made by vBulletin and install eAccelerator or APC?
eAccelerator, on top of caching the queries, it optimizes the PHP code also...
Reply With Quote
  #193  
Old 05-17-2006, 01:41 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I see several problems with that addon, don't even know where to start. I would not recommend using that at all since it can essentially ++++ up your installation. What happens if you insert some bad code in for example the global hook? You can't even disable that addon anymore then. Then you have to make all your files world writable. I'll add a note that using this plugin is not recommended with this extension.

TECK: As far as I can see, the plugin accelerator plugin writes the plugins INTO the official vBulletin files INSTEAD of the hook calls. So you basically end up hacking the offcial vBulletin files. Meaning when something goes wrong you can reinstall vBulletin. The problem is that APC/eAcc doesn't cache eval().

What I DO recommend is when you're having a lot of plugins move the code to an external .php file and include that one at the global hook. I have a 20kb plugin.php with all my php code in it, I only add if's and function calls to the actual plugins.
Reply With Quote
  #194  
Old 05-17-2006, 02:31 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban
Well, I see several problems with that addon, don't even know where to start. I would not recommend using that at all since it can essentially ++++ up your installation. What happens if you insert some bad code in for example the global hook? You can't even disable that addon anymore then. Then you have to make all your files world writable. I'll add a note that using this plugin is not recommended with this extension.

TECK: As far as I can see, the plugin accelerator plugin writes the plugins INTO the official vBulletin files INSTEAD of the hook calls. So you basically end up hacking the offcial vBulletin files. Meaning when something goes wrong you can reinstall vBulletin. The problem is that APC/eAcc doesn't cache eval().

What I DO recommend is when you're having a lot of plugins move the code to an external .php file and include that one at the global hook. I have a 20kb plugin.php with all my php code in it, I only add if's and function calls to the actual plugins.

Ive been using it with yours and everything seems fine


explain external.php ?
Reply With Quote
  #195  
Old 05-17-2006, 02:38 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well just see this extension, instead of putting all the PHP code into a plugin I move it to template_cache.php and just add a few lines to the plugins.
Reply With Quote
  #196  
Old 05-17-2006, 03:33 PM
dbembibre's Avatar
dbembibre dbembibre is offline
 
Join Date: Sep 2004
Location: Madrid (Spain)
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban
I am running it with vBulletin datastore cache and it works fine.

Uploaded a new version 1.0.3 with this option added. No other changes were made, if it's running fine for you there is no need to upgrade.
Thanks for the update Orban, your hack work really fine
Thanks for your great job
Reply With Quote
  #197  
Old 05-17-2006, 03:44 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban
Well just see this extension, instead of putting all the PHP code into a plugin I move it to template_cache.php and just add a few lines to the plugins.

oh ok *scratches head*
Reply With Quote
  #198  
Old 05-17-2006, 06:13 PM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MissKalunji
oh ok *scratches head*

me too
Reply With Quote
  #199  
Old 05-17-2006, 07:10 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's pretty easy.
He's having a master code static page, probably separated in functions.
Then, he calls the specific functions in plugin, with one line of code. Faster.
Reply With Quote
  #200  
Old 05-17-2006, 09:42 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes exactly.
Reply With Quote
  #201  
Old 05-17-2006, 09:43 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TECK
It's pretty easy.
He's having a master code static page, probably separated in functions.
Then, he calls the specific functions in plugin, with one line of code. Faster.

easy when you understand *feeling blond*
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 12:18 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.05141 seconds
  • Memory Usage 2,301KB
  • 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
  • (5)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
  • (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