vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Board Optimization - Plugin Based Template Cache (https://vborg.vbsupport.ru/showthread.php?t=113002)

TECK 05-17-2006 01:37 PM

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...

orban 05-17-2006 01:41 PM

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.

MissKalunji 05-17-2006 02:31 PM

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 ?

orban 05-17-2006 02:38 PM

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.

dbembibre 05-17-2006 03:33 PM

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 :)

MissKalunji 05-17-2006 03:44 PM

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*

DementedMindz 05-17-2006 06:13 PM

Quote:

Originally Posted by MissKalunji
oh ok *scratches head*


me too :confused:

TECK 05-17-2006 07:10 PM

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.

orban 05-17-2006 09:42 PM

Yes exactly.

MissKalunji 05-17-2006 09:43 PM

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 :confused: *feeling blond*


All times are GMT. The time now is 11:57 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
  • Page Generation 0.01397 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete