andersson (@andersson)

Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • My guess is that it happened here:

    https://trac.bbpress.org/changeset/1868

    In any case, could this possibly be the reason why saving a webaddress in the profile seems to be out of order as well?

    Anyways, appreciate it if you could look into this.

    I can also confirm this problem. 1.0alpha6.

    Could Sam or somone else working on this please let us know when there’s a fix available (in trunk or in new alpha for download).

    Never mind. I belive I found what was causing the slow load. Thanks.

    Well, I just updated from the trunk and I of course think this is a superb forum and the job you do is great and all that, but 80 queries in the topic overview page of my forums, 47 queries on the frontpage. That’s a tad too many.

    Are you, or are you not, looking into this in the future i.e. before the release? Thanks.

    Well then this problem may just be locally for me then, but when running the alpha 1.0, for a topic for instance, runing _CK_’s excellent admin tool you’ll see about 50-60 queries that does something like this:

    # 51 : 0.0195 seconds
    SELECT * FROM bb_users WHERE ID = '6526'

    # 52 : 0.0122 seconds
    SELECT meta_key, meta_value FROM bb_usermeta WHERE user_id = '6526' /* WP_Users::append_meta */

    # 53 : 0.0004 seconds
    SELECT * FROM bb_users WHERE ID = '5605'

    # 54 : 0.0003 seconds
    SELECT meta_key, meta_value FROM bb_usermeta WHERE user_id = '5605' /* WP_Users::append_meta */

    # 55 : 0.0014 seconds
    SELECT user_id, meta_key, meta_value FROM bb_usermeta WHERE user_id IN (365,1325,267,1088,2295,1106,94,1259,1225,1210,2230,3055,7,4566,3869,2992,1894,5690,2713,5873,6526,5605) /* WP_Users::append_meta */

    As you can see, it has run over 50 queries that simply does what is done correctly in query 55 (the last query). It seems it runs this for every post it displays (I display 30 posts per page).

    Like I said, maybe this is something that is just happening for me but I seem to remember someone having this problem with the first page also, but that time it was the topic meta I think.

    Any help is much appreciated.

    In reply to: Extending BB_Locale

    Well, just to tell anyone who – in the future – might be stuck on the same or a similar problem.

    I went with the following workaround:

    Find a hook (action/filter) that gets called early in the process like bb_location.

    Define a filter function for it.

    In that function, add the following peace of code.

    global $bb_locale;

    $bb_locale->datetime_formatstring = __(‘j M, Y’);

    Obviously, you can call your time format something else.

    Not the prettiest of solutions, but it works and I get to keep my bb_press installation free of code that I’ll surely forget to update.

    In reply to: phpBB3.0-style theme

    @Beer: When/if I get the time I’ll be sure to make it public. As you know it’s quite something else to make it work generically rather than for one specific site.

    Thanks for the praise though, appreciate it.

    @_ck_: Thanks. Yes, I also had a good mind of making that “online” banner that phpbb uses, available per user but other things caught my attention. ;)

    Anyways, glad you both liked it.

    :)

    ok ok, I believe you. 0.9.0.1 is good enough to give a try.

    Just one more thing: I’m guessing you have something like 100,000 pageviews a day in this forums which would render about 3,000,000 queries (moderate estimate) if you run bbpress 0901 out of the box. Your servers are cool with this? RAM at OK level?

    No need for exact figures but just a notion of what’s been your experience so far would be golden. 3,000,000 queries a day means around 35 queries per second. That’s some load.

    Thanks again.

    EDIT: The reason why I’m asking is that I’d really like to continue to use bbpress as my primary PHP-framework for all my sites that has logon/user needs as I’ve had a hard time to find a more suitable framework to my needs.

    0.72 is old yes. stable yes. quite fast yes.

    0.9.0.1 is new and shiny but we don’t know anything about the performance. It seems fast but I wonder if anyone who runs it *live* have some real data to show for it? That would be great.

    @_ck_: if you have some performance data please share. Thanks!

    I’m sort of amazed that no one else has mentioned this as a potential problem. I have on average 50,000 pageviews / day.

    So 50,000 pageviews / day * 35 queries / page gives 1,750,000 queries per day.

    I’m at one million queries as it is today with one of my sites running bbpress, I don’t think an upgrade is an option with the above since memory consumption has started to become an issue with that installation.

    The bb->load_options = true brought the load of the cpu to 5 times that of the one with 30+ queries but I guess that comes from not having that many topics in the newly installed Db so I really don’t know what to make of this.

    I’m of course realizing that bbpress rocks. Totally. I wouldn’t be asking these questions if I didn’t think it was worth while pursuing so don’t take the above the wrong way but do please give me a hint as to whether or not you advice me to go with this release or to stick with the 0.72 which I’ve found to be very stable.

    Any known issues with 0.9.0.1 so far? Anyone who has any reports on memory consumption? Very much appreciated.

    @sam: you do marvelous work. Thanks again.

    In reply to: phpBB3.0-style theme

    Thanks. Glad you liked it and thanks for the suggestion. I’ll see if I can find a better solution for that.

    About the visitor stats:

    The visitor stats is based on the session() and I make use of the global bb_current_user to figure out whether the session belongs to a member or not. Sessions that come from a visitor associated with a valid bb_current_user is put in the “members” columns, visitors without a valid bb_current_user is just a visitor.

    For speed I cache the retrieval on a minute by minute basis, while still recording the sessions in the background, so that at traffic peaks, I still don’t get that much pounding on the Db.

    Thanks for the praise and also for the tip on the middle column. Haven’t really thought of it before but you’re probably right about that one.

    Regarding the /profiles/x it is really a simple mod. You could do it in a number of ways really, where I chose the following:

    Add a row in .htaccess steering the call to the logic:

    RewriteRule ^profiles/?$ mods/profiles-by-letter.php?id=$1 [QSA,L]

    Personally I put the logic of all mods in separate files in a mod folder and the presentation in another to keep it clean.

    The rewrite rule of .htaccess makes “x” a GET-parameter to the logic, it’s then very easy to select all members starting with letter given by “x” like so:

    SELECT * FROM bb_users WHERE user_login LIKE '$first_letter' ORDER BY user_login LIMIT $limit

    That’s it. The logic part then calls the presentation which can use the result in an array or whatever format you choose for the result.

Viewing 12 replies - 1 through 12 (of 12 total)