MyBB Community Forums

Full Version: [Tutorial] 10 Steps for Achieving the Maximum Possible Speed for Your MyBB Forum!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Yeah, it would be great if you could have some kind of options for that!

Does MyBB plugins increase the loadtime by any chance.. Disabling plugin increases load time? Any mod or plugin to make all these changes?
The less plugins that are installed generally means faster load times, but if you have a plugin that specifically is designed to increase the speed i.e the ones I posted in the tutorial, then it should do the opposite.

List all your plugins if you have any concerns, just remove any plugins that are not necessary.
(2011-05-05, 01:25 PM)Renegader Wrote: [ -> ]Step 3: Let your CSS files load before your JavaScript. According to Google, this is a simple yet efficient method to reduce load time. This allows JS and CSS files to download in parallel. To do this, find headerinclude in your template list (ungrouped template) and find '{$stylesheets}'. Cut that move it right to the top headerinclude.

Step 7: Minify JavaScript and CSS files. - Minifying JavaScript and CSS reduces the size of the files and will result in faster load times although reduces readability of the file. Click here to use the compressor. Paste each of your JavaScript files (one at a time) in the box and click 'compress'. Copy the new code and paste it over the current JavaScript file (in your cPanel). Repeat for CSS by going into your theme Stylesheets in your Admin CP but make sure to change the 'file type' under the code box on the website.

Step 8: Combine Prototype, General and popupmenu JavaScript Files. Combing JavaScript files into one will reduce the number of lookups and decrease loading time by only having to download one JavaScript file instead of 3. You can easily combine them by going into your cPanel and viewing each of the codes. Next, create a new text file called 'combined' or so. Copy the content of each of your JavaScript files and paste them under each. Once done, save the file as <anything>.js and upload into your cPanel. Next, go into your header include and delete the 3 lines that contain the JS file, leave prototype, and replace prototype.js with <anything>.js. This can also be done with editor.js and other JS files that aren't displayed globally.

I've combined all 3 javascript files (taken from MyBB 1.6.3) into one and minimzed it with yuicompressor 2.4.6
The result is attached. Download it and save it to /jscripts/mybb.js
Then open your template headerinclude and find:

<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=1600"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
{$stylesheets}

Replace it with:

{$stylesheets}
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/mybb.js"></script>

This will save 2 http requests and 83 kB data transfer. Smile
I would vote to implement all these features with default mybb code
Thanks for the tutorial Smile I will try it!
(2011-05-12, 03:46 PM)querschlaeger Wrote: [ -> ]I've combined all 3 javascript files (taken from MyBB 1.6.3) into one and minimzed it with yuicompressor 2.4.6
The result is attached. Download it and save it to /jscripts/mybb.js
Then open your template headerinclude and find:
<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=1600"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
{$stylesheets}

Replace it with:

{$stylesheets}
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/mybb.js"></script>

This will save 2 http requests and 83 kB data transfer. Smile

Nice work, I'll put this in the main post. Credited you, too. Smile

Step 5: Install parsing plugins as well as a page optimiser. Download PreParser cache

It contains many bugs, some of my custom BB codes, don't work
It seems to be fine for me, otherwise I wouldn't have added them.
gtmatrix shows
There are 10 JavaScript files served from talkthetech.com. They should be combined into as few files as possible

forum/forumrunner/detect.js
forum/images/talkthetech/js/cufon.packed.js
forum/images/talkthetech/js/easing.js
forum/images/talkthetech/js/fonts/Merge.js
forum/images/talkthetech/js/jquery.1.5.1.js
forum/images/talkthetech/js/jquery.cycle.min.js
forum/images/talkthetech/js/scripts.js
forum/jscripts/general.js?ver=1601
forum/jscripts/popup_menu.js?ver=1601
forum/jscripts/prototype.js?ver=1601

Anyway to do this..
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17