Opened 7 years ago
Closed 7 years ago
#37416 closed defect (bug) (fixed)
In WP_Comment_Query::fill_descendants() compute the size beforehand and not on each iteration
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | low |
Severity: | normal | Version: | 4.4 |
Component: | Comments | Keywords: | good-first-bug has-patch needs-testing |
Focuses: | performance | Cc: |
Description
Currently count()
is called on each iteration.
Attachments (3)
Change History (12)
#2
@
7 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 38297:
#5
in reply to:
↑ 3
@
7 years ago
Replying to wonderboymusic:
In 38298:
@wonderboymusic, was this necessary after [38297]? Or is this just another optimization on top of that?
#7
@
7 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
@nacin See https://travis-ci.org/aaronjorbin/develop.wordpress/jobs/153889644#L380.
[38298] isn't needed if the condition in [38297] wasn't changed from <
to <=
. Was there a reason for that? I don't think so since the index starts at 0.
Note: See
TracTickets for help on using
tickets.
We need to go till end so needed
$i <= $level_count
,<=
because loop is starting from1
.