Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Improve page load time
Jon_Simmonds
Join Date: Nov 2005
Posts: 103

UK
by Jon_Simmonds Jon_Simmonds is offline 29 Jan 2010

With google now apperently taking in page load time into account for rankings, and looking at the Labs > Site Performance link on Google Webmaster Tools, it says my forums were slow to load up I have spent the last few days looking at how to speed things up. Now while you can control what googlebot see's via robots.txt, the info uses to generate page load time appears to come from the google toolbar, which means all parts of your site visible to members have the page load time logged

I came across this article on vbulletin.org - http://www.vbulletin.org/forum/showthread.php?t=223251 and just have a few quick tips that can be done to help make things faster.

I have mainly focused on what can be improved in terms of vbulletins templates, rather than tinkering with servers etc, some of these were touched in the article I linked in above but I feel that I have added onto them, all of this I have found from researching the net/google/etc so I don't take any credit for anything!

While doing this, I found it relativly easy to improve on the forumhome & forumdisplay templates, though when it comes to showthread the biggest issue is images in your member's signatures - inactive members could have links to images that 404, others may have multiple images in theirs.

1) If using the Yahoo CDN to host the YUI libraries, then use Yahoo's combine function


In the header include template replace the following

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

with

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This only works on the Yahoo CDN for the YUI files, not for Google or from your own server, if you use other YUI libraries then you can use this page to add what libraries you need : http://developer.yahoo.com/yui/artic...-dom-event&MIN

Simple really, 2 http requests or 1 http request, for what is the same data, that will be called on every page. If you use a few mods check if they use any other YUI libaries and consider loading them in this way.

2. Improve the loading of CSS

Using store CSS as a file I then modified the code to make vbulletin treat the CSS via a link rather than import - http://www.vbulletin.com/forum/showt...import-vs-link

Depending on your style, you could consider combining the CSS into one, to save on http requests, but that really depends on how you have your style setup on your forums.

3. Make use of css image sprites
These can really make a difference to page load times, I found a great CSS sprite generator
at http://csssprites.com/ although I prefer to use <img> tags rather than <div>'s that the generator uses, so read this article http://cssglobe.com/post/3028/creati...ul-css-sprites and use the background position info from the genarator & the <img> tags suggested by the article

4. Turn of signatures for in-active members

Consider turning off signatures for members who haven't been active in X days by changing the following code in both postbit & postbit_legacy (well either/or depending on how you run your forums)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Changing X to a value in days

[EDIT]
Or for vbulletin 4.x use the following (Thanks to BBR-APBT for the code)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[/EDIT]

Last edited by Jon_Simmonds; 02 Feb 2010 at 17:23..
Views: 16788
Reply With Quote
Comments
  #2  
Old 31 Jan 2010, 17:41
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
great tips
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #3  
Old 31 Jan 2010, 23:24
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Considering this is in the vB4 section the correct if conditionals will be.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
I will no longer support my modifications for people who are to lazy to read.
Reply With Quote
  #4  
Old 02 Feb 2010, 17:22
Jon_Simmonds Jon_Simmonds is offline
 
Join Date: Nov 2005
I had meant it to be for vb3.x, as I have not yet moved to 4, though the submissions area seams to cover both 3.x & 4.x

I will amend the first post with your code
Reply With Quote
  #5  
Old 03 Feb 2010, 20:26
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
I had a question about the conditional signature code as this is a great idea...

looking at your code below
<if condition="$post[lastactivity] > TIMENOW - X*86400">

you mention to change X to days but what do we do with *86400 which is 24 hours?

What would that look like if I wanted signature to not display if not active with 4 weeks ?


thanks
Reply With Quote
  #6  
Old 08 Feb 2010, 10:58
Audax666's Avatar
Audax666 Audax666 is offline
 
Join Date: Jun 2008
Location: Germany
4 Weeks are 28 days, so it should be 28*86400 in your code. (28 times x 1 day/24 hours)

Or am I wrong or missunderstood something?
__________________
That's all folks....

Thanks for visiting my projects:
laser tv news - rockabilly forum
Reply With Quote
  #7  
Old 11 Feb 2010, 02:08
lazydesis lazydesis is offline
 
Join Date: Sep 2006
the store as css does not seem to be working on vb4

when i go into admincp it throws me an error about parsing variables?

Fatal error: Only variables can be passed by reference in /home/MYDIR/public_html/includes/adminfunctions_template.php on line 3294
i commented out the code in blue and added the code in red


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

doesnt seem to work .. anyone can check this for me please .. thanks
__________________
http://www.lazydesis.com
Reply With Quote
  #8  
Old 20 Feb 2010, 11:04
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Real name: Corey
This is a great artile thanks for sharing
Reply With Quote
  #9  
Old 22 Mar 2010, 19:10
Kolbi's Avatar
Kolbi Kolbi is offline
 
Join Date: Mar 2009
Real name: Matthias
Are there other possitive reports about these improvements?
Reply With Quote
  #10  
Old 25 Mar 2010, 16:31
pant pant is offline
 
Join Date: Mar 2010
The best improvement I got overall was to disable CMS and Blogs and store the stile as files.
Reply With Quote
  #11  
Old 10 Apr 2010, 06:36
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Real name: alij
great tips
tnxxxx
Reply With Quote
  #12  
Old 21 Apr 2010, 07:36
samiro's Avatar
samiro samiro is offline
 
Join Date: Jan 2007
Originally Posted by BBR-APBT View Post
Considering this is in the vB4 section the correct if conditionals will be.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
its not working.
i set it to 100 days
and i can see sig' of users not been in the forum from 2009
__________________
Reply With Quote
  #13  
Old 21 Apr 2010, 10:55
Kolbi's Avatar
Kolbi Kolbi is offline
 
Join Date: Mar 2009
Real name: Matthias
Have you changed the x to something else?
Reply With Quote
  #14  
Old 05 May 2010, 01:33
slimgamer's Avatar
slimgamer slimgamer is offline
 
Join Date: Apr 2010
thanks for the idea & code! Implementing it on my test site to see how effective it is in my case.
__________________
SlimGamer uses vBulletin, do you?
Reply With Quote
  #15  
Old 29 Nov 2010, 20:15
evo10 evo10 is offline
 
Join Date: Nov 2007
Excellent
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
vbMicroStats: page load time, queries, GZIP and PHP version TECK vBulletin 2.x Full Releases 942 14 Jan 2005 23:43



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 11:49.

Layout Options | Width: Wide Color: