MyBB Community Forums

Full Version: Why the extra processing ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Example: If you want your forum to load times faster:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" >
<td class="trow1 {$unapproved_shade}">

// Then Remove these types of variables in templates :

{$theme['borderwidth']} /*and*/ {$theme['tablespace']} /*and*/ {$unapproved_shade} 

// they require more php processing. Replace with static values:

<table border="0" cellspacing="5" cellpadding="20" >
<td class="trow1">

Only use variables you need to output text, thread names, posts, etc...
I dont think they would require THAT much extra processing. You are already passing the template through PHP, and $theme is in the global space. Really, you would benefit more from the reduction in queries on the database.
(2014-02-27, 03:25 PM)Tom K. Wrote: [ -> ]I dont think they would require THAT much extra processing. You are already passing the template through PHP, and $theme is in the global space. Really, you would benefit more from the reduction in queries on the database.

This does not need to be in the template. Does not matter if its in the global, it still requires php processing.
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" >
<td class="trow1 {$unapproved_shade}">
it should be calling style tags thats already cached in the users browser
<table class="Xstyle" >
<td class="trow1">
That is the speed increase.
Please post threads in their appropriate forums.

Quote:General Discussion

General discussions that aren't about MyBB.