Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'test'

Viewing 25 results - 9,676 through 9,700 (of 11,617 total)
  • Author
    Search Results
  • #70802

    Also, when I register a new user through WordPress as per normal, that user is still not assigned a role in bbPress. Not when they login, not when they hit the forum for the first time. Not ever.

    My Steps:

    1. I used a Chrome browser window to register a new user through WordPress
    2. Logged in via WordPress
    3. Hit the forum
    4. User could not post, looks like has no role
    5. Logged out via WordPress
    6. Used FireFox to login as admin to check new user role
    7. No Role Assigned
    8. Used Chrome to login through bbPress
    9. Hit the forum
    10. User could not post, looks like has no role
    11. Used Firefox admin to edit Test user
    12. Received typical error message (noted below)

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /forums/bb-includes/functions.bb-template.php on line 2009

    Basically it looks like the exact same error message as before, with the same circumstances.


    Round two using alpha 5 trunk from the SVN went exactly the same way, only this time when I logged in via bbPress, the above Warning went away, but that user is still marked as Inactive by default when they should be a Member according to the role map.


    When registering through bbPress, the new user still is not assigned a Role on the WordPress side either.


    Sam, can you explain to me what was supposed to be different in alpha5? Maybe I misunderstood…

    #70731

    In reply to: bbpress vs phpbb

    chrishajer
    Participant
    #70268
    Ben L.
    Member

    Untested code below:

    <?php $bb_post = $posts[0]; unset($posts[0]);   $del_class = post_del_class();?>
    <div id="post-<?php post_id(); ?>"<?php alt_class('post', $del_class); ?>>
    <?php bb_post_template(); ?>
    </div>
    <h6>Responses</h6>
    <ol id="thread" start="<?php echo $list_start; ?>">
    <?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>
    <li id="post-<?php post_id(); ?>"<?php alt_class('post', $del_class); ?>>
    <?php bb_post_template(); ?>
    </li>
    <?php endforeach; ?>
    </ol>

    #4437
    -skipper-
    Member

    Based on Scoun theme from Mike Lothar.

    Plugins used:

    – Akismet

    – Human Test for bbPress

    – bbpress SEO tools

    – Allow Images

    http://marinerodeaguadulce.com/foro/

    Sam Bauers
    Participant

    Same implementation now in 0.9 branch, if someone could confirm 0.9 that would be great.

    Sam Bauers
    Participant

    Changes are now in trunk, please test.

    0.9 may be a little more hackish to implement.

    anotherdan
    Member

    Chris, My page went from loading in 2-8 seconds to 0.200 – 0.300 per request… So yes it was severe – as I said i use this function more than once in the theme…

    Ahh there of course is the join filter… Thanks CK I will move this out, so I am able to update the core without a problem… I have another “extremely slow” issue, but I will get back to that later because that’s in the bb-admin part so only few people see that…

    Sam Bauers
    Participant

    I’ll adjust core in trunk and 0.9 branch to implement this somehow.

    _ck_
    Participant

    >> The same performance gain is achieved using the existing forum_time index.

    Ah so in that case, no ALTER required and there is zero extra storage required and the plugin can be used like this:

    <?php
    /*
    Plugin Name: Topic Time Index
    */
    add_filter('get_latest_topics_join','topic_time_index',99999);
    function topic_time_index($join) {return " $join USE INDEX(forum_time) ";}
    ?>

    _ck_
    Participant

    Chris, you are missing the concept that if there are 100 people hitting the mysql server with the same or different queries and they can’t be cached, the load goes up exponentially.

    Sam’s benchmark is on a high performance, dedicated mysql server.

    Imagine someone with 40,000 records, non-indexed, on a shared server.

    Sam Bauers
    Participant

    @chrishajer

    It depends how many times that 1/10th of a second happens per second.

    Sam Bauers
    Participant

    The same performance gain is achieved using the existing forum_time index.

    chrishajer
    Participant

    I think it’s cool that the index and the mini-plugin can improve on bbPress, but “severe performance issues” to me is not going from 0.0920 to 0.0005 seconds. That’s from 1/10 of a second to nearly nothing. But 1/10 second was “severe performance issues”?

    Or, does this query from _ck_ just show a way to measure the improvement, where in actual usage, someone with 10K topics or 42K topics would see a performance hit (delay) much different than the test query that _ck_ posted. I’m all for improving what can be improved, but there are much larger issues to worry about than something that is taking 1/10th of a second. With bandwidth and browsers being what they are, the page isn’t going to load that quickly anyway, and adding 1/10 of a second to the processing time is not going to be noticeable to me.

    _ck_
    Participant

    Very nice. So it’s definitely proven to be way faster.

    But another question is, how much space does a non-unique index on 42,000 rows take?

    Sam Bauers
    Participant

    Here’s the result on WordPress.com’s English support forum:

    41,990 total rows

    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)
    Showing rows 0 - 24 (25 total, Query took 0.0024 sec)

    Showing rows 0 - 24 (25 total, Query took 0.2102 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2062 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2037 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2031 sec)
    Showing rows 0 - 24 (25 total, Query took 0.2060 sec)

    _ck_
    Participant

    I bet it only doubles the performance when it can sort in memory. Once it spills into a temporary disk sort, then you start seeing a more radical increase in performance between the forced index and not.

    I should also point out the mini-plugin (and index) will also help on any forum/sub-forum page in addition to the front-page. So all that extra index storage is at least multi-purpose.

    One way to boost this even further would be to ORDER BY the topic_last_post_id and then use the last_post_id as a UNIQUE index (key) since no two posts can have the same post_id (and no two topics can have the same last post_id). topic_time is not unique at all so it takes a tad longer for mysql to sort/larger index.

    chrishajer
    Participant

    With 615 topics, .0095 vs .0044 (~twice as fast). This is MySQL 4.0.27.

    _ck_
    Participant

    Wow that is very significant, thanks for sharing that!

    johnhiler
    Member

    I added the index and installed the plugin (my bb_topics has 11,826 records).

    The first query took 0.0005 sec. The second one took 0.0920 sec. That’s 184 times faster!

    _ck_
    Participant

    One possible way to benchmark the performance is to run these two queries in phpmyadmin (via SQL tab)

    SELECT SQL_NO_CACHE t.* FROM bb_topics AS t   USE INDEX(topic_time)  WHERE t.topic_status = '0' AND t.topic_sticky != '2'   ORDER BY t.topic_time DESC LIMIT 25

    vs.

    SELECT SQL_NO_CACHE t.* FROM bb_topics AS t  WHERE t.topic_status = '0' AND t.topic_sticky != '2'   ORDER BY t.topic_time DESC LIMIT 25

    On my setup the one with the forced index takes half the time of the one without, however we are talking 0.0026 sec vs 0.0013 sec so that is almost meaningless. What we need is someone with 10,000 topics and then you’ll know for certain.

    chrishajer
    Participant

    So long as it doesn’t kill anything (error out), I’m fine with installing it. I can wait for the performance improvements (if there will be any.) My forum has only 600 or so topics right now.

    _ck_
    Participant

    Should work on both 0.9 and trunk.

    Seems fine on my 0.9 and trunk.

    Unfortunately I have too few topics to benchmark any significant performance increase since this is only helpful to more active forums (ie. > 1000 topics)

    chrishajer
    Participant

    What versions will that work on, _ck_?

    _ck_
    Participant

    Not extensively tested but this will do it without a core hack

    (once ALTER TABLE bb_topics ADD INDEX (topic_time) is done)

    <?php
    /*
    Plugin Name: Topic Time Index
    */
    add_filter('get_latest_topics_join','topic_time_index',99999);
    function topic_time_index($join) {return " $join USE INDEX(topic_time) ";}
    ?>

    Seems maybe the core should be updated to work around this eh?

Viewing 25 results - 9,676 through 9,700 (of 11,617 total)
Skip to toolbar