Project

General

Profile

Actions

Bug #10147

closed

bp-reply-by-email status check runs a slow MySQL query

Added by Boone Gorges about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Reply By Email
Target version:
Start date:
2018-08-14
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Query Monitor is reporting a slow query on each pageload, which originates with RBE. See screenshot.

This appears to be at least somewhat due to the Cavalcade jobs table's schema. I wonder if we could add an index that would speed it up.

On RBE's end, do you think it's wise or possible to throttle the status checks? Once per pageload seems really frequent.


Files

Screenshot_2018-08-14_15-40-58.png (114 KB) Screenshot_2018-08-14_15-40-58.png Boone Gorges, 2018-08-14 11:42 AM
O2pMXkP.png (58.5 KB) O2pMXkP.png Boone Gorges, 2018-09-11 11:21 AM
Actions #1

Updated by Boone Gorges about 6 years ago

  • Target version set to 1.14

Feel free to put in a different milestone as you see fit. Thank you!

Actions #2

Updated by Raymond Hoh about 6 years ago

  • Status changed from New to Staged for Production Release
  • Target version changed from 1.14 to 1.13.9

So I was looking at how WordPress schedules its hourly privacy export deletion job and they do it on 'init':
https://github.com/WordPress/WordPress/blob/4.9-branch/wp-includes/default-filters.php#L331
https://github.com/WordPress/WordPress/blob/4.9-branch/wp-includes/functions.php#L6026

RBE used to schedule its job on 'plugins_loaded'.

Since WP's privacy export deletion job doesn't show up as a slow query in Query Monitor, I'm hoping moving RBE's check over to 'init' will solve this problem.

Here's the changeset - https://github.com/cuny-academic-commons/cac/commit/951f54d9b112b930b722e59871c63dab967041bd

Let's keep an eye on this after the maintenance release to see if the slow query is gone.

Actions #3

Updated by Boone Gorges about 6 years ago

Thanks, Ray!

It seems that your change just delays the inevitable, because now WordPress is making the same query, beating RBE to the punch :) I'm not going to worry about this too much.

Actions

Also available in: Atom PDF