About page slow / Menu slow to disapear

When selecting About from the hamburger :hamburger: menu the menu appears to be dismissed very slowly.

This is kinda two bugs / issues:

  1. Menu should be dismissed immediately upon click (from a user experience / feedback point of view).
  2. The about page is slow to load

####Although the issue doesn’t look that bad on meta:

####But when you compare that to a site with a larger number of posts:

####Possible slow query

1 Like

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.

The load time isn’t that much of an issue - it’s the menu not dismissing that made me want to report it…
… it makes it “feel broken”.

True, it is nice to get visual confirmation that a click worked.

I would think it would be easy enough to remove the highlighting upon the click event, but maybe not.

@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.

I am guessing

select count(*) from "posts"

will run plenty fast.

1 Like

Could this be an indicator of other slowness?

Perhaps select is used elsewhere in combination with deleted_at = null.

I have reported many slow queries in the past that haven’t seen any developer action.

I’m just throwing it out there.

Possibly but rarely select *

Seems like there should be some logic to dismiss the dropdown on click instead of waiting for the page to load.

Actually, yeah, this is an indicator of a missing index.

The posts table has no index on deleted_at, and almost all queries against the table filter for that!

1 Like

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.

3 Likes

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. :smile:

fade out fast seems fine to me.

1 Like

Just submitted a fix to dismiss dropdowns on click. Will look into about page issue soon.

https://github.com/discourse/discourse/pull/3571

2 Likes

Could I get a rough count of how many posts was on the site? I’m trying to reproduce the performance issue on development. Thanks :smile:

Topics: 40.1K
Posts: 432.2K
Users: 10.2K
Private Message Topics: 101.0K

1 Like

Patch landed on master. :smile:
https://github.com/discourse/discourse/commit/b0ea6764e0f1282e262182a3e1f048bd4b59d34f

Both issue in this topic should be resolved.

2 Likes

As fast as lightning ! thanks heaps :heart:

1 Like