MyBB Community Forums

Full Version: Question about the Template System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Someone I know from another forum software always criticizes MyBB because the templates are stored in the database and it requires extra queries to access things and such.

Is there any advantages or rebuttal to doing it this way instead of storing templates on files? And if so, will MyBB 2.0 be addressing any of these issues?
It is just one fast query per page... Wink The advantages are that you need no write permissions on the template files and that you can inherit from global/master template set easily.
Fair enough, I'm sold.
On this forum it's loading 132 templates in 0.00020194053649902 seconds. Two ten-thousandths of a second. Not really an issue.
Yeah, I'm convinced enough, don't worry.

I had some major performance issues when Bin Laden was around, but I cut a lot of queries and such and optimized the HTML/images.

One big suggestion I have is to load the stylesheets first. This is faster at the end of the day. I now score upwards of 90/100 sometimes.

{$stylesheets}
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1600"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
CSS isn't loaded before JS really?

Edit: By default I mean.
Nope. This is MyBB's own site.

<script type="text/javascript" src="http://community.mybb.com/jscripts/prototype.js?ver=1600"></script>
<script type="text/javascript" src="http://community.mybb.com/jscripts/general.js?ver=1600"></script>
<script type="text/javascript" src="http://community.mybb.com/jscripts/popup_menu.js?ver=1600"></script>
<link type="text/css" rel="stylesheet" href="http://community.mybb.com/cache/themes/theme2/global.css" /> 
<link type="text/css" rel="stylesheet" href="http://community.mybb.com/cache/themes/theme1/star_ratings.css" /> 
<link type="text/css" rel="stylesheet" href="http://community.mybb.com/cache/themes/theme1/showthread.css" />