It looks like this is a web page, not a feed. I looked for a feed associated with this page, but couldn't find one. Please enter the address of your feed to validate.

Source: http://xosq.shop/ticket/2353?format=rss

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  <head>
  12.    <title>
  13.      #2353 (bbp_update_forum_reply_count on a 1.8MM post bbPress forum takes ~6-10 seconds)
  14.     – bbPress Trac
  15.    </title>
  16.      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  17.      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  18.    <!--[if IE]><script type="text/javascript">
  19.      if (/^#__msie303:/.test(window.location.hash))
  20.        window.location.replace(window.location.hash.replace(/^#__msie303:/, '#'));
  21.    </script><![endif]-->
  22.          <link rel="search" href="/search" />
  23.          <link rel="prev" href="/ticket/2352" title="Ticket #2352" />
  24.          <link rel="last" href="/ticket/3609" title="Ticket #3609" />
  25.          <link rel="help" href="/wiki/TracGuide" />
  26.          <link rel="alternate" href="/ticket/2353?format=csv" type="text/csv" class="csv" title="Comma-delimited Text" />
  27.          <link rel="alternate" href="/ticket/2353?format=tab" type="text/tab-separated-values" class="tab" title="Tab-delimited Text" />
  28.          <link rel="alternate" href="/ticket/2353?format=rss" type="application/rss+xml" class="rss" title="RSS Feed" />
  29.          <link rel="next" href="/ticket/2354" title="Ticket #2354" />
  30.          <link rel="start" href="/wiki" />
  31. <link rel="stylesheet" href="https://s.w.org/style/trac/common/css/trac.css?v=220" />
  32. <link rel="stylesheet" href="https://s.w.org/style/trac/common/css/ticket.css?v=220" />
  33. <link rel="stylesheet" href="https://s.w.org/style/trac/common/css/jquery-ui/jquery-ui.css?v=220" />
  34. <link rel="stylesheet" href="https://s.w.org/style/trac/common/css/jquery-ui-addons.css?v=220" />
  35.          <link rel="icon" href="https://bbpress.org/favicon.ico" type="image/x-icon" />
  36.          <link rel="first" href="/ticket/1" title="Ticket #1" />
  37.    <style id="trac-noscript" type="text/css">.trac-noscript { display: none !important }</style>
  38.      <link type="application/opensearchdescription+xml" rel="search" href="/search/opensearch" title="Search bbPress Trac" />
  39.    <script type="text/javascript">
  40.      var auto_preview_timeout=2.0;
  41.      var form_token="a76058d7974bad9a1d9bd5c1";
  42.      var jquery_ui={"ampm":true,"date_format":"mm/dd/yy","day_names":{"abbreviated":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"narrow":["Su","Mo","Tu","We","Th","Fr","Sa"],"wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"default_timezone":null,"first_week_day":0,"month_names":{"abbreviated":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wide":["January","February","March","April","May","June","July","August","September","October","November","December"]},"period_names":{"am":["AM","AM"],"pm":["PM","PM"]},"show_timezone":false,"time_format":"hh:mm:ss TT","timepicker_separator":" ","timezone_iso8601":false,"timezone_list":null};
  43.      var comments_prefs={"comments_order":"oldest","show_comments":"true","show_prop_changes":"true"};
  44.    </script>
  45. <link rel="dns-prefetch" href="//fonts.googleapis.com" />
  46. <link rel="dns-prefetch" href="//www.googletagmanager.com" />
  47. <script>//<![CDATA[
  48. (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  49. new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  50. j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  51. 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  52. })(window,document,'script','dataLayer','GTM-P24PF4B');
  53. //]]></script>
  54. <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&amp;subset=latin%2Clatin-ext&amp;ver=3.8.1-alpha" type="text/css" media="all" />
  55. <link type="text/css" media="screen" rel="stylesheet" href="//bbpress.org/wp-content/themes/bb-base/style.css?v=24" />
  56. <link type="text/css" media="screen" rel="stylesheet" href="//bbpress.org/wp-content/themes/bb-base/style-bbpress.css?v=24" />
  57.  
  58. <meta name="viewport" content="width=device-width" />
  59. <link rel="stylesheet" href="https://s.w.org/wp-includes/css/dashicons.min.css?20150710" type="text/css" />
  60. <link rel="stylesheet" type="text/css" href="https://s.w.org/style/trac/wp-trac.css?220" />
  61. <script src="https://s.w.org/style/trac/common/js/jquery.js?v=220"></script>
  62. <link rel="canonical" href="https://bbpress.trac.wordpress.org/ticket/2353" />
  63. <script src="https://s.w.org/style/trac/common/js/babel.js?v=220"></script>
  64. <script src="https://s.w.org/style/trac/common/js/trac.js?v=220"></script>
  65. <script src="https://s.w.org/style/trac/common/js/search.js?v=220"></script>
  66. <script src="https://s.w.org/style/trac/common/js/folding.js?v=220"></script>
  67. <script src="https://s.w.org/style/trac/common/js/wikitoolbar.js?v=220"></script>
  68. <script src="https://s.w.org/style/trac/common/js/resizer.js?v=220"></script>
  69. <script src="https://s.w.org/style/trac/common/js/auto_preview.js?v=220"></script>
  70. <script src="https://s.w.org/style/trac/common/js/jquery-ui.js?v=220"></script>
  71. <script src="https://s.w.org/style/trac/common/js/jquery-ui-addons.js?v=220"></script>
  72. <script src="https://s.w.org/style/trac/common/js/jquery-ui-i18n.js?v=220"></script>
  73.    <script type="text/javascript">
  74.      jQuery("#trac-noscript").remove();
  75.      jQuery(document).ready(function($) {
  76.        $(".trac-autofocus").focus();
  77.        $(".trac-target-new").attr("target", "_blank");
  78.        if ($.ui) { /* is jquery-ui added? */
  79.          $(".trac-datepicker:not([readonly])").prop("autocomplete", "off").datepicker();
  80.          $(".trac-datetimepicker:not([readonly])").prop("autocomplete", "off").datetimepicker();
  81.          $("#main").addClass("trac-nodatetimehint");
  82.        }
  83.        $(".trac-disable").disableSubmit(".trac-disable-determinant");
  84.        setTimeout(function() { $(".trac-scroll").scrollToTop() }, 1);
  85.        $(".trac-disable-on-submit").disableOnSubmit();
  86.      });
  87.    </script>
  88. <script src="https://s.w.org/style/trac/common/js/threaded_comments.js?v=220"></script>
  89.    <script type="text/javascript">
  90.      jQuery(document).ready(function($) {
  91.        $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor(_("Link to this section"));
  92.        $(".foldable").enableFolding(false, true);
  93.      /*<![CDATA[*/
  94.        $("#attachments").toggleClass("collapsed");
  95.        $("#trac-up-attachments").click(function () {
  96.          $("#attachments").removeClass("collapsed");
  97.          return true;
  98.        });
  99.        $("#modify").parent().toggleClass("collapsed");
  100.        $(".trac-topnav a").click(function() { $("#modify").parent().removeClass("collapsed"); });
  101.        function setRevertHandler() {
  102.          $("button.trac-revert").click(function() {
  103.            var div = $("div", this);
  104.            var field_name = div[0].id.substr(7);
  105.            var field_value = div.text();
  106.            var input = $("#propertyform *[name=field_" + field_name + "]");
  107.            if (input.length > 0) {
  108.              if (input.filter("input[type=radio]").length > 0) {
  109.                input.val([field_value]);
  110.              } else if (input.filter("input[type=checkbox]").length > 0) {
  111.                input.val(field_value == "1" ? [field_value] : []);
  112.              } else {
  113.                input.val(field_value);
  114.              }
  115.            } else { // Special case for CC checkbox
  116.              input = $("#propertyform input[name=cc_update]").val([]);
  117.            }
  118.            input.change();
  119.            // Remove the revert button
  120.            if ($(this).closest("tbody").children("tr").length === 1)
  121.              $(this).closest(".trac-change-panel").remove();
  122.            else
  123.              $(this).closest("tr").remove();
  124.            return false;
  125.          });
  126.        }
  127.        setRevertHandler();
  128.        var comment_focused = false;
  129.        $("#comment").focus(function() { comment_focused = true; })
  130.                     .blur(function() { comment_focused = false; });
  131.        $("#propertyform").autoSubmit({preview: '1'}, function(data, reply) {
  132.          var items = $(reply);
  133.          // Update ticket box
  134.          $("#ticket").replaceWith(items.filter('#ticket'));
  135.          // Replaces content of #changelog, without recreating it
  136.          $("#changelog").empty().append(items.filter("#changelog").contents());
  137.          // Apply comments order and "Show" preferences
  138.          applyCommentsOrder(
  139.            $('#prefs input[name="trac-comments-order"]:checked').val());
  140.          // Show warning
  141.          var new_changes = $("#changelog .trac-new");
  142.          $("#trac-edit-warning").toggle(new_changes.length != 0);
  143.          if (new_changes.length != 0)
  144.            $("#changelog").parent().show().removeClass("collapsed");
  145.          // Update view time
  146.          $("#propertyform input[name='view_time']").replaceWith(items.filter("input[name='view_time']"));
  147.          // Update preview
  148.          var preview = $("#ticketchange").html(items.filter('#preview').children());
  149.          var show_preview = preview.children().length != 0;
  150.          $("#ticketchange").toggle(show_preview);
  151.          setRevertHandler();
  152.          // Execute scripts to load stylesheets
  153.          items.filter("script").appendTo("head");
  154.        }, "#ticketchange .trac-loading");
  155.        $("#trac-comment-editor").autoSubmit({preview_comment: '1'}, function(data, reply) {
  156.          var comment = $("#trac-comment-editor").next("div.comment").html(reply);
  157.          comment.toggle(comment.children().length != 0);
  158.        }, "#changelog .trac-loading");
  159.        /*]]>*/
  160.      });
  161.    </script>
  162.  </head>
  163.  <body id="wordpress-org" class="bbpress trac wporg-make make-bbpress">
  164. <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P24PF4B" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  165.    <dl id="accessibility">
  166.        <dt>Skip to:</dt>
  167.        <dd><a href="#content" title="Skip to content">Content</a></dd>
  168.    </dl>
  169.    <div id="wporg-header">
  170.        <div id="header-inner">
  171. <button id="mobile-menu-button" aria-expanded="false"><span class="screen-reader-text">Toggle Menu</span></button>
  172.            <ul id="wporg-header-menu">
  173.                <li><a href="https://bbpress.org/about/">About</a></li>
  174.                <li><a href="https://bbpress.org/plugins/">Plugins</a></li>
  175.                <li><a href="https://bbpress.org/themes/">Themes</a></li>
  176.                <li><a href="https://codex.bbpress.org/">Documentation</a></li>
  177.                <li><a href="https://bbpress.org/blog/">Blog</a></li>
  178.                <li><a href="https://bbpress.org/forums/">Support</a></li>
  179.                <li class="download"><a href="https://bbpress.org/download/">Download</a></li>
  180.            </ul>
  181.            <h1><a href="https://bbpress.org">bbPress.org</a></h1>
  182.        </div>
  183.    </div>
  184. <div id="subnav">
  185. <div id="subnav-inner">
  186. <ul id="nav-user" class="menu">
  187. <li class="last first">
  188. <a href="https://login.wordpress.org/?redirect_to=https%3A%2F%2Fbbpress.trac.wordpress.org%2Fticket%2F2353" class="login">Login</a>
  189. </li>
  190. </ul>
  191. </div>
  192. </div>
  193. <div id="banner">
  194. <form id="search" action="/search" method="get">
  195.        <div>
  196.          <label for="proj-search">Search:</label>
  197.          <input type="text" id="proj-search" name="q" size="18" value="" />
  198.          <input type="submit" value="Search" />
  199.        </div>
  200.      </form>
  201. </div>
  202.    <div id="mainnav" class="nav">
  203.    <ul>
  204.      <li class="first"><a href="/timeline">Timeline</a></li><li class="active"><a href="/report">View Tickets</a></li><li><a href="/roadmap">Roadmap</a></li><li><a href="/browser">Browse Source</a></li><li class="last"><a href="/ticketgraph">Ticket Graph</a></li>
  205.    </ul>
  206.  </div>
  207.    <div id="main">
  208.      <div id="ctxtnav" class="nav">
  209.        <h2>Context Navigation</h2>
  210.        <ul>
  211.          <li class="first"><span>&larr; <a class="prev" href="/ticket/2352" title="Ticket #2352">Previous Ticket</a></span></li><li class="last"><span><a class="next" href="/ticket/2354" title="Ticket #2354">Next Ticket</a> &rarr;</span></li>
  212.        </ul>
  213.        <hr />
  214.      </div>
  215.    <div id="content" class="ticket">
  216.        <div id="ticket" class="trac-content ">
  217.  <div class="date">
  218.    <p>Opened <a class="timeline" href="/timeline?from=2013-06-15T19%3A12%3A28Z&amp;precision=second" title="See timeline at 06/15/2013 07:12:28 PM">11 years ago</a></p>
  219.    <p>Closed <a class="timeline" href="/timeline?from=2014-02-13T05%3A06%3A32Z&amp;precision=second" title="See timeline at 02/13/2014 05:06:32 AM">11 years ago</a></p>
  220.    <p>Last modified <a class="timeline" href="/timeline?from=2019-06-10T12%3A12%3A02Z&amp;precision=second" title="See timeline at 06/10/2019 12:12:02 PM">5 years ago</a></p>
  221.  </div>
  222.  <h2>
  223.    <a href="/ticket/2353" class="trac-id">#2353</a>
  224.    <span class="trac-status">
  225.      <a href="/query?status=closed">closed</a>
  226.    </span>
  227.    <span class="trac-type">
  228.      <a href="/query?status=!closed&amp;type=defect+(bug)">defect (bug)</a>
  229.    </span>
  230.    <span class="trac-resolution">
  231.      (<a href="/query?status=closed&amp;resolution=duplicate">duplicate</a>)
  232.    </span>
  233.  </h2>
  234.  <h1 id="trac-ticket-title" class="searchable">
  235.    <span class="summary">bbp_update_forum_reply_count on a 1.8MM post bbPress forum takes ~6-10 seconds</span>
  236.  </h1>
  237.  <table class="properties">
  238.    <tr>
  239.      <th id="h_reporter">Reported by:</th>
  240.      <td headers="h_reporter" class="searchable">
  241.  <a href="https://profiles.wordpress.org/vibol" data-nicename="vibol">
  242.    <img class="avatar" src="https://wordpress.org/grav-redirect.php?user=vibol&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=vibol&amp;s=96 2x" height="48" width="48" alt="vibol's profile" />
  243.  </a>
  244.    <a class="trac-author" href="/query?status=!closed&amp;reporter=vibol">vibol</a>
  245. </td>
  246.      <th id="h_owner">Owned by:</th>
  247.      <td headers="h_owner">
  248.  <a href="https://profiles.wordpress.org/johnjamesjacoby">
  249.    <img class="avatar" src="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=96 2x" height="48" width="48" alt="johnjamesjacoby's profile" />
  250.  </a>
  251.    <a class="trac-author" href="/query?status=!closed&amp;owner=johnjamesjacoby">johnjamesjacoby</a>
  252. </td>
  253.    </tr>
  254.    <tr>
  255.        <th id="h_milestone" class="missing">
  256.          Milestone:
  257.        </th>
  258.        <td headers="h_milestone">
  259.        </td>
  260.        <th id="h_priority">
  261.          Priority:
  262.        </th>
  263.        <td headers="h_priority">
  264.              <a href="/query?status=!closed&amp;priority=normal">normal</a>
  265.        </td>
  266.    </tr><tr>
  267.        <th id="h_severity">
  268.          Severity:
  269.        </th>
  270.        <td headers="h_severity">
  271.              <a href="/query?status=!closed&amp;severity=normal">normal</a>
  272.        </td>
  273.        <th id="h_version">
  274.          Version:
  275.        </th>
  276.        <td headers="h_version">
  277.              <a href="/query?status=!closed&amp;version=2.2.3">2.2.3</a>
  278.        </td>
  279.    </tr><tr>
  280.        <th id="h_component">
  281.          Component:
  282.        </th>
  283.        <td headers="h_component">
  284.              <a href="/query?status=!closed&amp;component=General+-+Performance">General - Performance</a>
  285.        </td>
  286.        <th id="h_keywords">
  287.          Keywords:
  288.        </th>
  289.        <td headers="h_keywords" class="searchable">
  290.              <a href="/query?status=!closed&amp;keywords=~needs-patch">needs-patch</a>
  291.        </td>
  292.    </tr><tr>
  293.        <th id="h_cc">
  294.          Cc:
  295.        </th>
  296.        <td headers="h_cc" class="searchable">
  297.              <a href="/query?status=!closed&amp;cc=~UmeshSingla">UmeshSingla</a>
  298.        </td>
  299.        <th class="missing">
  300.        </th>
  301.        <td>
  302.        </td>
  303.    </tr>
  304.  </table>
  305.  <div class="description">
  306.    <h3 id="comment:description">
  307.      Description
  308.    </h3>
  309.    <div class="searchable">
  310.      <p>
  311. This can likely use some optimization.<br />
  312. </p>
  313. <p>
  314. I haven't dug in enough to come up with a solution but I believe this function is what causes the massive query attached. Perhaps these aggregates should be placed in a separate table and incremented or decremented according to the posts added/removed. At the numbers I'm working with, eventual consistency of the aggregate numbers is acceptable.<br />
  315. </p>
  316. <p>
  317. Scenarios affected: Add new post, Reply to post, Trash post, Delete post.<br />
  318. </p>
  319. <p>
  320. Action execution times: ~6-10s depending on freshness of data in memory and size of forum.<br />
  321. </p>
  322. <p>
  323. System: 12-core, 64GB RAM<br />
  324. </p>
  325. <p>
  326. Function in question: bbp_update_forum_reply_count <br />
  327. </p>
  328. <p>
  329. Actual query: see attached.<br />
  330. </p>
  331.  
  332.    </div>
  333.  </div>
  334. </div>
  335.          
  336.    <div id="attachments">
  337.        <h3 class="foldable">Attachments <span class="trac-count">(1)</span></h3>
  338.        <div class="attachments">
  339.          <dl class="attachments">
  340.              <dt>
  341.    <a href="/attachment/ticket/2353/bbp_update_forum_reply_count_query_log.txt" title="View attachment">bbp_update_forum_reply_count_query_log.txt</a><a href="/raw-attachment/ticket/2353/bbp_update_forum_reply_count_query_log.txt" class="trac-rawlink" title="Download">​</a> (<span title="423495 bytes">413.6 KB</span>) - added by <span class="trac-author">vibol</span> <a class="timeline" href="/timeline?from=2013-06-15T19%3A12%3A37Z&amp;precision=second" title="See timeline at 06/15/2013 07:12:37 PM">11 years ago</a>.
  342.  </dt>
  343.          </dl>
  344.          <p>
  345.            Download all attachments as: <a rel="nofollow" href="/zip-attachment/ticket/2353/">.zip</a>
  346.          </p>
  347.          
  348.        </div>
  349.    </div>
  350.  
  351.        <div>
  352.          <div class="trac-noscript" style="position: relative">
  353.            <form id="prefs" method="get" action="/prefs" style="position: absolute; right: 0">
  354.              <div id="trac-comments-order">
  355.                <input type="radio" id="trac-comments-oldest" name="trac-comments-order" value="oldest" checked="checked" />
  356.                <label for="trac-comments-oldest">Oldest first</label>
  357.                <input type="radio" id="trac-comments-newest" name="trac-comments-order" value="newest" />
  358.                <label for="trac-comments-newest">Newest first</label>
  359.                <span id="trac-threaded-toggle" style="display: none">
  360.                  <input type="radio" id="trac-comments-threaded" name="trac-comments-order" value="threaded" />
  361.                  <label for="trac-comments-threaded">Threaded</label>
  362.                </span>
  363.              </div>
  364.              <div>
  365.                <input id="trac-show-comments-toggle" type="checkbox" checked="checked" />
  366.                <label for="trac-show-comments-toggle">Show comments</label>
  367.                <input id="trac-show-property-changes-toggle" type="checkbox" />
  368.                <label for="trac-show-property-changes-toggle">Show property changes</label>
  369.              </div>
  370.            </form>
  371.          </div>
  372.          <h3 class="foldable">Change History <span class="trac-count">(12)</span></h3>
  373.          <div id="changelog">
  374.              <div class="change">
  375.                
  376.  <h3 class="change">
  377.    <span class="threading">
  378.    </span>
  379.        <span class="avatar">
  380.          <span class="username-line"><a href="https://profiles.wordpress.org/vibol" class="profile-link">
  381.            <img src="https://wordpress.org/grav-redirect.php?user=vibol&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=vibol&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="vibol" data-nicename="vibol"><span class="trac-author">vibol</span></span></a></span>
  382.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2013-06-15T19%3A12%3A37Z&amp;precision=second" title="See timeline at 06/15/2013 07:12:37 PM">11 years</a> ago</span>
  383.        </span>
  384.    <div class="trac-ticket-buttons">
  385.    </div>
  386.  </h3>
  387.  <div class="trac-ticket-buttons"></div>
  388.  <ul class="changes">
  389.    <li class="trac-field-attachment">
  390.      <strong class="trac-field-attachment">Attachment</strong>
  391.        <a href="/attachment/ticket/2353/bbp_update_forum_reply_count_query_log.txt"><em>bbp_update_forum_reply_count_query_log.txt</em></a><a href="/raw-attachment/ticket/2353/bbp_update_forum_reply_count_query_log.txt" title="Download" class="trac-rawlink">​</a>
  392.          added
  393.    </li>
  394.  </ul>
  395.  
  396.              </div>
  397.              <div class="change" id="trac-change-1-1371966781349253">
  398.                
  399.  <h3 class="change">
  400.    <span class="threading">
  401.      <span id="comment:1" class="cnum">
  402.    <a href="#comment:1">#1</a>
  403.  </span>
  404.    </span>
  405.        <span class="avatar">
  406.          <span class="username-line"><a href="https://profiles.wordpress.org/johnjamesjacoby" class="profile-link">
  407.            <img src="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="johnjamesjacoby" data-nicename="johnjamesjacoby"><span class="trac-author">johnjamesjacoby</span></span></a></span>
  408.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2013-06-23T05%3A53%3A01Z&amp;precision=second" title="See timeline at 06/23/2013 05:53:01 AM">11 years</a> ago</span>
  409.        </span>
  410.    <div class="trac-ticket-buttons">
  411.    </div>
  412.  </h3>
  413.  <div class="trac-ticket-buttons"></div>
  414.  <ul class="changes">
  415.    <li class="trac-field-keywords">
  416.      <strong class="trac-field-keywords">Keywords</strong>
  417.        <em>needs-patch</em> added
  418.    </li><li class="trac-field-milestone">
  419.      <strong class="trac-field-milestone">Milestone</strong>
  420.        changed from <em>Awaiting Review</em> to <em>2.5</em>
  421.    </li>
  422.  </ul>
  423.    <div class="comment searchable">
  424.      <p>
  425. Moving to 2.5 so we can address this with a few other performance issues. Thanks for attaching the log.<br />
  426. </p>
  427.  
  428.    </div>
  429.  
  430.              </div>
  431.              <div class="change" id="trac-change-2-1385135318159784">
  432.                
  433.  <h3 class="change">
  434.    <span class="threading">
  435.      <span id="comment:2" class="cnum">
  436.    <a href="#comment:2">#2</a>
  437.  </span>
  438.    </span>
  439.        <span class="avatar">
  440.          <span class="username-line"><a href="https://profiles.wordpress.org/johnjamesjacoby" class="profile-link">
  441.            <img src="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="johnjamesjacoby" data-nicename="johnjamesjacoby"><span class="trac-author">johnjamesjacoby</span></span></a></span>
  442.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2013-11-22T15%3A48%3A38Z&amp;precision=second" title="See timeline at 11/22/2013 03:48:38 PM">11 years</a> ago</span>
  443.        </span>
  444.    <div class="trac-ticket-buttons">
  445.    </div>
  446.  </h3>
  447.  <div class="trac-ticket-buttons"></div>
  448.  <ul class="changes">
  449.    <li class="trac-field-milestone">
  450.      <strong class="trac-field-milestone">Milestone</strong>
  451.        changed from <em>2.5</em> to <em>2.6</em>
  452.    </li>
  453.  </ul>
  454.    <div class="comment searchable">
  455.      <p>
  456. Bump to 2.6.<br />
  457. </p>
  458.  
  459.    </div>
  460.  
  461.              </div>
  462.              <div class="change" id="trac-change-3-1386195623804116">
  463.                
  464.  <h3 class="change">
  465.    <span class="threading">
  466.      <span id="comment:3" class="cnum">
  467.    <a href="#comment:3">#3</a>
  468.  </span>
  469.    </span>
  470.        <span class="avatar">
  471.          <span class="username-line"><a href="https://profiles.wordpress.org/johnjamesjacoby" class="profile-link">
  472.            <img src="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="johnjamesjacoby" data-nicename="johnjamesjacoby"><span class="trac-author">johnjamesjacoby</span></span></a></span>
  473.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2013-12-04T22%3A20%3A23Z&amp;precision=second" title="See timeline at 12/04/2013 10:20:23 PM">11 years</a> ago</span>
  474.        </span>
  475.    <div class="trac-ticket-buttons">
  476.    </div>
  477.  </h3>
  478.  <div class="trac-ticket-buttons"></div>
  479.  <ul class="changes">
  480.    <li class="trac-field-component">
  481.      <strong class="trac-field-component">Component</strong>
  482.        changed from <em>General</em> to <em>Performance Improvements</em>
  483.    </li>
  484.  </ul>
  485.  
  486.              </div>
  487.              <div class="change" id="trac-change-4-1386196054397910">
  488.                
  489.  <h3 class="change">
  490.    <span class="threading">
  491.      <span id="comment:4" class="cnum">
  492.    <a href="#comment:4">#4</a>
  493.  </span>
  494.    </span>
  495.        <span class="avatar">
  496.          <span class="username-line"><a href="https://profiles.wordpress.org/johnjamesjacoby" class="profile-link">
  497.            <img src="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=johnjamesjacoby&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="johnjamesjacoby" data-nicename="johnjamesjacoby"><span class="trac-author">johnjamesjacoby</span></span></a></span>
  498.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2013-12-04T22%3A27%3A34Z&amp;precision=second" title="See timeline at 12/04/2013 10:27:34 PM">11 years</a> ago</span>
  499.        </span>
  500.    <div class="trac-ticket-buttons">
  501.    </div>
  502.  </h3>
  503.  <div class="trac-ticket-buttons"></div>
  504.  <ul class="changes">
  505.    <li class="trac-field-owner">
  506.      <strong class="trac-field-owner">Owner</strong>
  507.        set to <em>johnjamesjacoby</em>
  508.    </li>
  509.  </ul>
  510.  
  511.              </div>
  512.              <div class="change" id="trac-change-5-1389770727878392">
  513.                
  514.  <h3 class="change">
  515.    <span class="threading">
  516.      <span id="comment:5" class="cnum">
  517.    <a href="#comment:5">#5</a>
  518.  </span>
  519.    </span>
  520.        <span class="avatar">
  521.          <span class="username-line"><a href="https://profiles.wordpress.org/netweb" class="profile-link">
  522.            <img src="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="netweb" data-nicename="netweb"><span class="trac-author">netweb</span></span></a></span>
  523.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2014-01-15T07%3A25%3A27Z&amp;precision=second" title="See timeline at 01/15/2014 07:25:27 AM">11 years</a> ago</span>
  524.        </span>
  525.    <div class="trac-ticket-buttons">
  526.    </div>
  527.  </h3>
  528.  <div class="trac-ticket-buttons"></div>
  529.    <div class="comment searchable">
  530.      <p>
  531. Some quick stats based on 1 forum with 827 Topics and 1,640 replies ( @vibol's above info is ~22,500 topics in 1 forum)<br />
  532. </p>
  533. <p>
  534. <code>bbp_update_forum_reply_count</code> (<a class="ext-link" href="https://bbpress.trac.wordpress.org/browser/trunk/includes/forums/functions.php#L1519"><span class="icon">​</span>\includes\forums\functions.php#1519</a>)<br />
  535. </p>
  536. <p>
  537. Current: <code>Query took 0.0327 sec</code> (Each of the 827 topic id's in this forum omitted for readability)<br />
  538. </p>
  539. <div class="wiki-code"><div class="code"><pre><span class="k">SELECT</span> <span class="k">COUNT</span><span class="p">(</span>ID<span class="p">)</span>
  540. <span class="k">FROM</span> wp_posts
  541. <span class="k">WHERE</span> post_parent
  542. <span class="k">IN</span> <span class="p">(</span> <span class="mi">103020</span><span class="p">,</span><span class="mi">103016</span><span class="p">,</span><span class="mi">103013</span><span class="p">,</span><span class="mi">103010</span><span class="p">,</span><span class="mi">103006</span><span class="p">...</span> <span class="p">)</span>
  543. <span class="k">AND</span> post_status <span class="o">=</span> <span class="s1">'publish'</span> <span class="k">AND</span> post_type <span class="o">=</span> <span class="s1">'reply'</span><span class="p">;</span>
  544. </pre></div></div><p>
  545. Alternate: <code>Query took 0.0141 sec</code><br />
  546. </p>
  547. <div class="wiki-code"><div class="code"><pre><span class="cp">&lt;?php</span>
  548. <span class="nv">$reply_count</span> <span class="o">=</span> <span class="p">(</span><span class="nx">int</span><span class="p">)</span> <span class="nv">$wpdb</span><span class="o">-&gt;</span><span class="na">get_var</span><span class="p">(</span> <span class="nv">$wpdb</span><span class="o">-&gt;</span><span class="na">prepare</span><span class="p">(</span> <span class="s2">"SELECT COUNT(ID) FROM </span><span class="si">{</span><span class="nv">$wpdb</span><span class="o">-&gt;</span><span class="na">posts</span><span class="si">}</span><span class="s2"> WHERE post_parent IN ( SELECT ID  FROM `wp_posts` WHERE `post_parent` = </span><span class="si">$forum_id</span><span class="s2">   ) AND post_status = '%s' AND post_type = '%s';"</span><span class="p">,</span> <span class="nx">bbp_get_public_status_id</span><span class="p">(),</span> <span class="nx">bbp_get_reply_post_type</span><span class="p">()</span> <span class="p">)</span> <span class="p">);</span>
  549. </pre></div></div><p>
  550. SQL<br />
  551. </p>
  552. <div class="wiki-code"><div class="code"><pre><span class="k">SELECT</span> <span class="k">COUNT</span><span class="p">(</span>ID<span class="p">)</span>
  553. <span class="k">FROM</span> wp_posts
  554. <span class="k">WHERE</span> post_parent
  555. <span class="k">IN</span> <span class="p">(</span>
  556.    <span class="k">SELECT</span> ID  <span class="k">FROM</span> <span class="o">`</span>wp_posts<span class="o">`</span> <span class="k">WHERE</span> <span class="o">`</span>post_parent<span class="o">`</span> <span class="o">=</span> <span class="mi">96480</span>  
  557. <span class="p">)</span>
  558. <span class="k">AND</span> post_status <span class="o">=</span> <span class="s1">'publish'</span> <span class="k">AND</span> post_type <span class="o">=</span> <span class="s1">'reply'</span>
  559. </pre></div></div><p>
  560. This conservatively halves the query time though because we are not using <code>bbp_forum_query_topic_ids</code> we are including 'any' reply including those that are NOT public.<br />
  561. </p>
  562. <p>
  563. Pretty much just thinking out loud here...<br />
  564. </p>
  565.  
  566.    </div>
  567.  
  568.              </div>
  569.              <div class="change" id="trac-change-6-1391496804698945">
  570.                
  571.  <h3 class="change">
  572.    <span class="threading">
  573.      <span id="comment:6" class="cnum">
  574.    <a href="#comment:6">#6</a>
  575.  </span>
  576.    </span>
  577.        <span class="avatar">
  578.          <span class="username-line"><a href="https://profiles.wordpress.org/netweb" class="profile-link">
  579.            <img src="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="netweb" data-nicename="netweb"><span class="trac-author">netweb</span></span></a></span>
  580.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2014-02-04T06%3A53%3A24Z&amp;precision=second" title="See timeline at 02/04/2014 06:53:24 AM">11 years</a> ago</span>
  581.        </span>
  582.    <div class="trac-ticket-buttons">
  583.    </div>
  584.  </h3>
  585.  <div class="trac-ticket-buttons"></div>
  586.    <div class="comment searchable">
  587.      <p>
  588. Related: <a class="new ticket" href="/ticket/2533" title="#2533: enhancement: Optimize Repair Tools SQL Queries (new)">#2533</a><br />
  589. </p>
  590.  
  591.    </div>
  592.  
  593.              </div>
  594.              <div class="change" id="trac-change-7-1391497085238484">
  595.                
  596.  <h3 class="change">
  597.    <span class="threading">
  598.      <span id="comment:7" class="cnum">
  599.    <a href="#comment:7">#7</a>
  600.  </span>
  601.    </span>
  602.        <span class="avatar">
  603.          <span class="username-line"><a href="https://profiles.wordpress.org/netweb" class="profile-link">
  604.            <img src="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="netweb" data-nicename="netweb"><span class="trac-author">netweb</span></span></a></span>
  605.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2014-02-04T06%3A58%3A05Z&amp;precision=second" title="See timeline at 02/04/2014 06:58:05 AM">11 years</a> ago</span>
  606.        </span>
  607.    <div class="trac-ticket-buttons">
  608.    </div>
  609.  </h3>
  610.  <div class="trac-ticket-buttons"></div>
  611.    <div class="comment searchable">
  612.      <p>
  613. Extending this ticket to include 'all the forum things' around <code>bbp_update_forum()</code><br />
  614. </p>
  615. <ul><li><code>bbp_update_forum_last_topic_id</code>
  616. </li><li><code>bbp_update_forum_last_reply_id</code>
  617. </li><li><code>bbp_update_forum_last_active_id</code>
  618. </li><li><code>bbp_update_forum_last_active_time</code>
  619. </li><li><code>bbp_update_forum_subforum_count</code>
  620. </li><li><code>bbp_update_forum_reply_count</code>
  621. </li><li><code>bbp_update_forum_topic_count</code>
  622. </li><li><code>bbp_update_forum_topic_count_hidden</code>
  623. </li></ul>
  624.    </div>
  625.  
  626.              </div>
  627.              <div class="change" id="trac-change-8-1392246302675583">
  628.                
  629.  <h3 class="change chat-bot">
  630.    <span class="avatar">
  631.      <span class="username-line">
  632.        <img src="https://wordpress.org/grav-redirect.php?user=ircbot&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=ircbot&amp;s=96 2x" height="48" width="48" alt="" />
  633.        <p>
  634. <em>This ticket was mentioned in IRC in #bbpress-dev by netweb. <a class="ext-link" href="http://irclogs.wordpress.org/chanlog.php?channel=bbpress-dev&amp;day=2014-02-12&amp;sort=asc#m15220"><span class="icon">​</span>View the logs</a>.</em><br />
  635. </p>
  636.      </span>
  637.      <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2014-02-12T23%3A05%3A02Z&amp;precision=second" title="See timeline at 02/12/2014 11:05:02 PM">11 years</a> ago</span>
  638.    </span>
  639.    <div class="trac-ticket-buttons">
  640.    </div>
  641.  </h3>
  642.  
  643.              </div>
  644.              <div class="change" id="trac-change-9-1392267992192866">
  645.                
  646.  <h3 class="change">
  647.    <span class="threading">
  648.      <span id="comment:9" class="cnum">
  649.    <a href="#comment:9">#9</a>
  650.  </span>
  651.    </span>
  652.        <span class="avatar">
  653.          <span class="username-line"><a href="https://profiles.wordpress.org/netweb" class="profile-link">
  654.            <img src="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=netweb&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="netweb" data-nicename="netweb"><span class="trac-author">netweb</span></span></a></span>
  655.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2014-02-13T05%3A06%3A32Z&amp;precision=second" title="See timeline at 02/13/2014 05:06:32 AM">11 years</a> ago</span>
  656.        </span>
  657.    <div class="trac-ticket-buttons">
  658.    </div>
  659.  </h3>
  660.  <div class="trac-ticket-buttons"></div>
  661.  <ul class="changes">
  662.    <li class="trac-field-milestone">
  663.      <strong class="trac-field-milestone">Milestone</strong>
  664.        <em>2.6</em> deleted
  665.    </li><li class="trac-field-resolution">
  666.      <strong class="trac-field-resolution">Resolution</strong>
  667.        set to <em>duplicate</em>
  668.    </li><li class="trac-field-status">
  669.      <strong class="trac-field-status">Status</strong>
  670.        changed from <em>new</em> to <em>closed</em>
  671.    </li>
  672.  </ul>
  673.    <div class="comment searchable">
  674.      <p>
  675. Closing this ticket in favor of <a class="closed ticket" href="/ticket/1799" title="#1799: defect (bug): Introduce 'bump' functions to replace costly recounts (closed: fixed)">#1799</a> as it already has a work in progress patch for <code>bbp_update_forum_reply_count</code><br />
  676. </p>
  677.  
  678.    </div>
  679.  
  680.              </div>
  681.              <div class="change" id="trac-change-10-1392280862375287">
  682.                
  683.  <h3 class="change chat-bot">
  684.    <span class="avatar">
  685.      <span class="username-line">
  686.        <img src="https://wordpress.org/grav-redirect.php?user=ircbot&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=ircbot&amp;s=96 2x" height="48" width="48" alt="" />
  687.        <p>
  688. <em>This ticket was mentioned in IRC in #bbpress-dev by sc0ttkclark. <a class="ext-link" href="http://irclogs.wordpress.org/chanlog.php?channel=bbpress-dev&amp;day=2014-02-13&amp;sort=asc#m15319"><span class="icon">​</span>View the logs</a>.</em><br />
  689. </p>
  690.      </span>
  691.      <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2014-02-13T08%3A41%3A02Z&amp;precision=second" title="See timeline at 02/13/2014 08:41:02 AM">11 years</a> ago</span>
  692.    </span>
  693.    <div class="trac-ticket-buttons">
  694.    </div>
  695.  </h3>
  696.  
  697.              </div>
  698.              <div class="change" id="trac-change-11-1560168722034125">
  699.                
  700.  <h3 class="change">
  701.    <span class="threading">
  702.      <span id="comment:11" class="cnum">
  703.    <a href="#comment:11">#11</a>
  704.  </span>
  705.    </span>
  706.        <span class="avatar">
  707.          <span class="username-line"><a href="https://profiles.wordpress.org/umeshsingla" class="profile-link">
  708.            <img src="https://wordpress.org/grav-redirect.php?user=umeshsingla&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=umeshsingla&amp;s=96 2x" height="48" width="48" alt="" /> @<span class="username" data-username="UmeshSingla" data-nicename="umeshsingla"><span class="trac-author">UmeshSingla</span></span></a></span>
  709.            <br /><span class="time-ago"><a class="timeline" href="/timeline?from=2019-06-10T12%3A12%3A02Z&amp;precision=second" title="See timeline at 06/10/2019 12:12:02 PM">5 years</a> ago</span>
  710.        </span>
  711.    <div class="trac-ticket-buttons">
  712.    </div>
  713.  </h3>
  714.  <div class="trac-ticket-buttons"></div>
  715.  <ul class="changes">
  716.    <li class="trac-field-cc">
  717.      <strong class="trac-field-cc">Cc</strong>
  718.        <em>UmeshSingla</em> added
  719.    </li>
  720.  </ul>
  721.  
  722.              </div>
  723.          </div>
  724.        </div>
  725.      <div id="help"><strong>Note:</strong> See
  726.        <a href="/wiki/TracTickets">TracTickets</a> for help on using
  727.        tickets.</div>
  728.    </div>
  729.    <script type="text/javascript">
  730.        jQuery.loadStyleSheet("/pygments/trac.css", "text/css");
  731.    </script>
  732.    <div id="altlinks">
  733.    <a class="preferences-link" href="/prefs">Trac UI Preferences</a>
  734.      <h3>Download in other formats:</h3>
  735.      <ul>
  736.        <li class="first">
  737.          <a rel="nofollow" href="/ticket/2353?format=csv" class="csv">Comma-delimited Text</a>
  738.        </li><li>
  739.          <a rel="nofollow" href="/ticket/2353?format=tab" class="tab">Tab-delimited Text</a>
  740.        </li><li class="last">
  741.          <a rel="nofollow" href="/ticket/2353?format=rss" class="rss">RSS Feed</a>
  742.        </li>
  743.      </ul>
  744. </div>
  745.    </div>
  746. <div id="footer">
  747. <div class="links">
  748. <p>
  749. See also:
  750. <a href="http://wordpress.org">WordPress.org</a> •
  751. <a href="http://bbpress.org">bbPress.org</a> •
  752. <a href="http://buddypress.org">BuddyPress.org</a> •
  753. <a href="http://ma.tt">Matt</a> •
  754. <a href="http://bbpress.org/feed/" title="RSS Feed for Articles">Blog RSS</a>
  755. </p>
  756. </div>
  757. <div class="details">
  758. <p>
  759. <a href="http://twitter.com/bbpress" class="twitter">Follow bbPress on Twitter</a> •
  760. <a href="http://bbpress.org/about/gpl/">GPL</a> •
  761. <a href="http://bbpress.org/contact/">Contact Us</a> •
  762. <a href="http://bbpress.org/terms/">Terms of Service</a>
  763. </p>
  764. </div>
  765. </div>
  766. <script>
  767. var wpTracCurrentUser = "anonymous";
  768. </script>
  769. <script src="https://s.w.org/style/js/navigation.min.js?20190128"></script>
  770. <script src="https://s.w.org/style/trac/jquery.caret.min.js?ver=2015-02-01"></script>
  771. <script src="https://s.w.org/style/trac/jquery.atwho.min.js?ver=1.0.1"></script>
  772. <script src="https://s.w.org/style/trac/wp-trac.js?220"></script>
  773. </body>
  774. </html>
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda