Skip to:
Content

bbPress.org

Opened 3 years ago

Closed 2 years ago

#3090 closed defect (fixed)

Speed up `bbp_is_user_engaged()`

Reported by: thebrandonallen Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: Component - Users Keywords: has-patch
Cc:

Description

In bbp_is_user_engaged() we, first, check that the user has any engagements. If so, we then grab the topic id, and see if the user is engaged on that topic.

On my large test install bbp_get_user_engagements() is painfully slow. Posting a new reply to a topic takes minutes. Removing this call, and simply relying on the more efficient bbp_is_object_of_user() bring us, literally, back up to speed.

Attachments (1)

3090.diff (1.9 KB) - added by thebrandonallen 3 years ago.

Download all attachments as: .zip

Change History (3)

@thebrandonallen
3 years ago

#1 @johnjamesjacoby
2 years ago

Good call. Looking now...

#2 @johnjamesjacoby
2 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 6389:

Engagements: Simplify bbp_is_user_engaged().

  • Remove $engagements gathering & return in filter
  • Remove topic verification dance (no reason to re-get or guess at the topic)
  • Add $user_id validation

Props thebrandonallen. FIxes #3090.

Note: See TracTickets for help on using tickets.