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

What is the slowest part of XenForo and how would you improve it?

Discussion in 'Off Topic' started by Adam Howard, Nov 2, 2013.

  1. Adam Howard

    Adam Howard Well-Known Member

    I made a post about this earlier and maybe posted it in the wrong forum. And I think it was lost in miscommunication. So since this is a general topic, lets try here.

    I love XenForo :love: It's very modern, fast loading, user and mobile friendly. (y)

    However the rule of technology (universally), is it can only be as fast as it's slowest part.

    For example, I can buy the newest i7 Intel CPU, pop in the latest motherboard, and load it with a server grade SSD drive, but if I go cheap on the ram that would be my bottleneck or the slowest part.

    I hope I've explained the "slowest part" concept in away most people can understand it. :) But if not, please give your own example. ;)

    Software is no different and that includes forum software. No matter if you compare vBulletin, IPB, Burning Board, phpBB, SMF, or even XenForo there will be some point that you can say is the slowest part.

    XenForo is fast and I love it. :love:

    But to me the slowest part appear to be deferred.php Even on XenForo.com running the file by its self is still 1/2 a second (between 200 - 500 ms)

    http://xenforo.com/community/deferred.php

    Which of course calls upon

    /library/XenForo/Autoloader.php

    I've not really dugged to deep into the code & only have noticed how things load in Firebug. And of course 1/2 a second is nothing to cry about. XenForo should be proud that it's "slowest part" is only 1/2 a second compared to others.

    Of course if you disagree with my opinion.... Where would you believe xenforo could be improved upon (where is it's slowest part)?
     
    Last edited: Nov 2, 2013
  2. Adam Howard

    Adam Howard Well-Known Member

  3. euantor

    euantor Well-Known Member

    Just a note on the cron part, any decent host worth their paying for will allow you to set up cron jobs :)
     
    SneakyDave and Adam Howard like this.
  4. Adam Howard

    Adam Howard Well-Known Member

    My host allows it. :) But I know there are those who don't.
     
  5. digitalpoint

    digitalpoint Well-Known Member

    The slowest part in my opinion revolves around how MySQL needs to process all omitted records before a LIMIT. This means the higher page number you are viewing in a forum (list of threads), the slower.

    You can see this by going to a normal forum, page 1... for example:

    https://forums.digitalpoint.com/forums/domains.59/

    Then in the same forum, go to a much higher page (let's say page 1000):

    https://forums.digitalpoint.com/forums/domains.59/page-1000

    My site will actually be slower than most in that case because we don't use a storage engine that has all data on a single server (like InnoDB or MyISAM). We use ndbcluster, which takes parts from multiple servers and reassembles them (99.99% of the queries will be faster, but some are not). Either way, all storage engines are affected to some degree of performance degradation the higher the LIMIT value in the query is.

    XenForo did a really good job solving this in threads by storing the post "position" within the thread so it doesn't need to use the LIMIT clause. Not sure if there's a realistic way to do the same with threads within a forum since they can be viewed so many different ways (various sorting and filtering options would make the position value unique to each combo).

    I did start working on it within an internal "Scalability" addon I have, and got most of it done. Basically I have it storing a unique position value for each sort type that regenerates all the position values in that forum when something changes (like a new thread or someone replies). I figured I would use those for displaying thread vs the LIMIT query when it can (when there isn't extra filters like prefix filtering), and fall back to the default method when it can't. One of these days I'll finish it. :)
     
    Jeffin likes this.
  6. CrimsonSoul

    CrimsonSoul Active Member

    The slowest part if xenforo is the slow part. I'd fix it by making it faster.
     
    SneakyDave likes this.
  7. Carlos

    Carlos Well-Known Member

  8. Chris D

    Chris D XenForo Developer Staff Member

    Yeah. I really think @digitalpoint doesn't know that already.
     
    oman, tajhay, Teapot and 8 others like this.

Share This Page