I’m willing to bet there’s no “possible” about it.
I’m wondering if “real time - live” stats are needed here.
Would it be that big of a deal if “all time” and “7 days” were a bit off depending on the time the About page was looked at?
Personally, I don’t have a problem with the page load time, but maybe some kind of CRON could be used to get the stats “close enough”?
At least for the About. IMHO the Admin stats are viewed less frequently and by those more understanding so leaving them to be created “when called” should be OK as is and have benefit the way they are.
@neil for this page, drop the deleted_at part of the query – the total posts minus deletions is just going to be noise, how many can there possibly be? We don’t need that much accuracy here.
The index only improves it a bit, it still has to scan the entire index to get the count, data here should be cached at least for a few minutes, and the transition should be smoother.
I’m working on a fix right now for the dropdown not dismissing until the new page loads. I’ve provided two samples below, fadeOut('fast') and hide() respectively.
fadeOut('fast')
hide()
Would love to get some thoughts on which to go with.