1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How Do I Increase Forum Site Speed?

Discussion in 'XenForo Questions and Support' started by Kenneth Holland, Oct 2, 2012.

  1. Kenneth Holland

    Kenneth Holland Active Member

    Hi All,

    I am very close to launching my XF-powered forum but I'd like to get some input on increasing page load speed.

    The root of my site is Wordpress and uses W3 Total Cache and is pretty fast. The forum is in a subdirectory. I'd like to get some input from the community here and what I could implement to improve performance...ie page caching, etc...

    Any help would be appreciated. :)

    Ken
     
  2. Adam Howard

    Adam Howard Well-Known Member

    Turn off developer mod

    ---- If you have it on it uses resources even when no one is on the site.

    Turn off guest searching

    ---- Spam bots, cyber bots, and other little evil things will abuse search and eat your site alive. Have a few 500 people refresh the search page and you have a successful DDOS tactic.

    Remove the members list

    ---- 50% (or more) speed boost by doing this
    ---- Reduce spam threat as well

    http://xenforo.com/community/resources/remove-members-list.1036/
     
    gasg, fattony69, surfsup and 2 others like this.
  3. Adam Howard

    Adam Howard Well-Known Member

    Remove Sidebar Share Page

    This is a simple way to increase your front page load time. Simply open the template sidebar_share_page and delete its content. Any time you would like to re-add this to the sidebar, simply revert the template.

    By doing this you will minimize DNS look up on the front page. This will not affect all the many share buttons you may have on your forums, threads, or other places. So don't worry.

    xenforo.com 2012-10-2 2:11:43.png
     
    fattony69 and vVv like this.
  4. Adam Howard

    Adam Howard Well-Known Member

    fattony69 likes this.
  5. Walter

    Walter Well-Known Member

  6. Adam Howard

    Adam Howard Well-Known Member

    The page Socially Uncensored got an overall PageSpeed Score of 92 (out of 100).:cool:

    With over 350 customizations (add-ons, skins, template edits, file edits, and 3rd part products) .... I can't say I'm doing all that bad at 92 out of 100 :D
     
  7. BenForum

    BenForum Active Member

    pretty useless tool with sidebar enabled it gave me a score of 85 and when i removed the sidebar share page the score was reduced to 64.
     
  8. Walter

    Walter Well-Known Member

    Definitely useful :)
    You have to carefully read the results. It's not about a big magic score.
     
    Insy likes this.
  9. craigiri

    craigiri Well-Known Member

    OK, so it says 87 - with the biggest problem being the lack of compression of the .js files.

    But that's the jquery files as well as some add-on files - tapatalk, gritter, etc. - they show as being on my server.

    So, is there a XF setting I should check? Or is this in apache setup?
     
  10. Walter

    Walter Well-Known Member

    If you have Cpanel then login to your control panel, click on "Optimize Website" and choose "Compress all content".
     
  11. craigiri

    craigiri Well-Known Member

    No cpanel....

    I will fiddle with apache conf - after I carefully check what is set now. I suspect my html and php is already being compressed - just not my js
     
  12. Walter

    Walter Well-Known Member

    If the needed Apache module mod_deflate is installed you can enable this in your .htaccess for any files you want e.g.


    Code:
    <IfModule mod_deflate.c>
    <FilesMatch ".*\.(html|php|css|js|xml)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
    AddOutputFilterByType DEFLATE application/javascript application/x-javascript
    </IfModule>
    For details see http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
     
    Brandon Sheley likes this.
  13. craigiri

    craigiri Well-Known Member

    Great - that seems to have done the job according to some reports (pagespeed still says it is not compressed, but other utilities say it is - maybe pagespeed has cache).

    Or, maybe because those .js files are served from elsewhere (goog, etc.)?...they are uncompressed by the time they show up on my page?
     
  14. Kenneth Holland

    Kenneth Holland Active Member

    Hi Adam,

    Do you where I can find APC with File Cache?
     
  15. Adam Howard

    Adam Howard Well-Known Member

    I mean use them together.

    Install php5-APC and have it run in the background. That will help with some php performance.

    If you're on a shared host, that installing APC is not possible.... But File Cache is indeed possible and usable.

    PHP:
    $config['cache']['enabled'] = true;
    $config['cache']['cacheSessions'] = true;
    $config['cache']['backend'] = 'File';
    $config['cache']['backendOptions'] ['cache_dir'] = 'PATH TO CACHE FOLDER - CAN BE NAMED ANY THING';
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] ['cache_id_prefix'] = 'YOU PREFIX HERE';
    You may need the full server path for file cache
     
  16. Kenneth Holland

    Kenneth Holland Active Member

    Will APC work on a VPS?
     
  17. Adam Howard

    Adam Howard Well-Known Member

    Yes, VPS or Dedicated. :)

    Simply install it and it will do it's thing.

    Assuming you have Debian or Ubuntu

    PHP:
    aptitude update
    PHP:
    aptitude install php5-apc
    PHP:
    /etc/init.d/apache2 restart
    If you're not using a control panel. Now is also a good time to make sure everything is updated


    PHP:
    aptitude update
    PHP:
    aptitude full-upgrade
     
  18. kkm323

    kkm323 Well-Known Member

  19. Adam Howard

    Adam Howard Well-Known Member

    123conwood likes this.
  20. Walter

    Walter Well-Known Member

    You can do much better, even on shared hosting.
    I would start with the high priority suggestion, browser caching.
     
    vVv likes this.

Share This Page