Bug #10147

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

Added by Boone Gorges about 1 year ago. Updated 12 months ago.

Priority name:
Category name:
Reply By Email
Target version:
Start date:
Due date:
% Done:


Estimated time:


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.

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


#1 Updated by Boone Gorges 12 months ago

  • Target version set to 1.14

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

#2 Updated by Raymond Hoh 12 months 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':

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 -

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

#3 Updated by Boone Gorges 12 months 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.

Also available in: Atom PDF