Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

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
  #372  
Old 07-21-2007, 03:12 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1) As I said if you are interested in maximizing performance take a look at the one I marked as experimental, I will actually clean that up a bit soon and upload here. Just did a quick and dirty benchmark with microtime, you save about 4*10^-6 seconds if you remove the double eval.

2) Good idea, thanks. Clearing the cache in the shell is the best idea anyway.
Reply With Quote
  #373  
Old 07-21-2007, 04:45 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The experimental Version is quite nice

However if breaks

Template foobarcheck
Code:
<if condition="$foo = 'bar'">
</if>
PHP Code:
$foo 'foo';
eval(
'$devnull = "' fetch_template('foobarcheck') . '";');
// $foo = ? 
Without this Plugin, $foo is bar. With this plugin it is still foo.

Also, you don't need to pass superglobals like $GLOBALS
Reply With Quote
  #374  
Old 07-21-2007, 04:48 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do vB default templates have <if> conditions? Because all the default templates work fine for me. Feel free to filter out $GLOBALS, but what does it matter anyway? This level of detail is absolutely unnecessary you won't gain any performance by spending your time on that. The step from eval(very long string) to eval(function call cached by opcode cacher) is the important one.
Reply With Quote
  #375  
Old 07-21-2007, 06:14 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Do vB default templates have <if> conditions?
Yes, they do - kind of.

Template memberlist_resultsbit for example:
Code:
<if condition="$show['emailcol'] AND exec_switch_bg()"><td class="$bgclass">
Without your plugin, you will get alternating column backgrounds.
With your Plugin, you won't

By using references, you could fix that; would also save some memory/processing.
For example, $vbphrase is used in almost all templates.
With the current code, this array is always being copied when a template is eval'ed.

Nevermid, I just wanted to make suggestion to improve this further. Sorry.
Reply With Quote
  #376  
Old 07-21-2007, 10:57 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright I see where you are coming from. Yeah references will solve the problem, vB's code is more messed up than you'd ever think. Well I updated functions_template_cache.php.
Reply With Quote
  #377  
Old 07-25-2007, 06:39 PM
RS_Jelle RS_Jelle is offline
 
Join Date: Jul 2005
Posts: 1,276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban View Post
Alright I see where you are coming from. Yeah references will solve the problem, vB's code is more messed up than you'd ever think. Well I updated functions_template_cache.php.
So we just need to upload the new functions_template_cache.php to our FTP to have the everything actual on our forum for this mod?

It would be easier if you gave it a new version number (and eventually send an update mail to all users). Now it's a bit confusing as there's no concrete information about the changes (or we need to read the full thread) and the mod is marked as updated ...
Reply With Quote
  #378  
Old 07-25-2007, 07:04 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be easier if you read the first line.
Reply With Quote
  #379  
Old 07-25-2007, 07:44 PM
RS_Jelle RS_Jelle is offline
 
Join Date: Jul 2005
Posts: 1,276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by orban View Post
It would be easier if you read the first line.
I'm sorry, I missed that line
Reply With Quote
Reply

Thread Tools

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 09:19 AM.


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.08283 seconds
  • Memory Usage 2,283KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (3)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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