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

Memory Usage and Number of queries

Discussion in 'XenForo Pre-Sales Questions' started by Freeze Dried Pop, Sep 1, 2010.

  1. This isn't so much a suggestion as a question, but it comes bundled with a suggestion as well.

    How much memory is used on an average page load? Especially for common things like displaying a topic page?

    Also how many queries are used on some of the most common pages?

    Seeing as you're still really early in your developement and this is somewhat of a beta forum, it'd be great if at the bottom it said "15 queries in 0.48 seconds using 2.48mb of memory" on every page, so that we could keep an eye on this sort of thing.

    At the moment i'm using Invision Power Board and the 20mb it uses on common pages is ridiculous, i'd be hoping for something much lower from another script if I was to move.
  2. Mike

    Mike XenForo Developer Staff Member

    It tells you this in debug mode. Memory usage is a bit pointless to compare unless you're comparing it on the same server, as architecture, PHP version, and configuration will all effect the value.

    But when I first loaded this thread (which has queries for thread and forum read marking):
    Reloading the page so those queries don't run takes it to .0223 seconds and 11 queries. (Most of the difference is a write to an InnoDB table; I'm considering changing that but I think it would end up being less beneficial.)
    Vladislav Rastrusny and Walter like this.
  3. I'm assuming that I can't enable debug mode as just a normal user browsing these forums?

    I do realise that memory usage will differ from server to server, but (assuming you're using the memory_get_peak_usage() function, it should give a pretty good indication). 3.6MB is pretty good though, out of interest do you make use of autoload? I don't think i've ever seen a CMS or Forum use one, probably so as not to break compatibility with other scripts or something.
  4. Mike

    Mike XenForo Developer Staff Member

    No, debug mode can't be enabled. It's actually a bit of a security risk as it'll tell you all the queries that it runs.

    And yes, we use an autoloader.
  5. Yeah that's understandable, if it'd be possible to enable just "10 queries in 0.47 seconds" for normal users that'd be awesome, if not then don't worry about it.
  6. Onimua

    Onimua Well-Known Member

    Why do normal users have to see it? Most probably don't even know what it means or care. :confused:
  7. I meant just for this forum, as mentioned earlier this appears to be basically acting as a beta/demo and I'm guessing everyone here is a developer who's looking at whether or not they would want to use this script. As such a person, such information is really important to me, no?
    Vladislav Rastrusny likes this.
  8. Onimua

    Onimua Well-Known Member

    Ah, alright. I had thought you meant having it enabled/displayed on regular installations.

Share This Page