# About page slow / Menu slow to disapear

**URL:** https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635
**Category:** Bug
**Tags:** slow-sql
**Created:** [2015年一月30日 23:45 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635 "2015-01-30T23:45:18Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年一月30日 23:45 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/1 "2015-01-30T23:45:18Z")

</div>

When selecting `About` from the 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`** :  
 ![](https://global.discourse-cdn.com/meta/original/3X/9/6/964f87cd46118381c18889e61a56c00d1b81d5cd.gif)

####But when you compare that to a site with a larger number of posts:  
 ![](https://global.discourse-cdn.com/meta/original/3X/9/e/9e59928ab36c5f1ec29d03c84ed128e0b0f1b5a3.gif)

####Possible slow query  
 ![](https://global.discourse-cdn.com/meta/original/3X/0/8/08ac801f5de2655234300b2762708d3097ca90b3.png)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2015年一月30日 23:59 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/2 "2015-01-30T23:59:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年一月31日 00:04 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/3 "2015-01-31T00:04:28Z")

</div>

> [@Mittineague](#):
>
> I don’t have a problem with the page load time

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

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2015年一月31日 00:08 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/4 "2015-01-31T00:08:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年一月31日 00:30 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/5 "2015-01-31T00:30:16Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年一月31日 00:52 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/6 "2015-01-31T00:52:19Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年一月31日 01:00 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/7 "2015-01-31T01:00:03Z")

</div>

Possibly but rarely `select *`

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [2015年一月31日 02:50 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/8 "2015-01-31T02:50:23Z")

</div>

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

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015年一月31日 13:35 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/9 "2015-01-31T13:35:18Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年二月19日 06:16 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/10 "2015-02-19T06:16:55Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2015年六月25日 16:11 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/11 "2015-06-25T16:11:45Z")

</div>

我正在修复下拉菜单在新页面加载前无法关闭的问题。下面提供了两个示例，分别是 `fadeOut('fast')` 和 `hide()`。

#### `fadeOut('fast')`

![](https://global.discourse-cdn.com/meta/original/4X/6/6/7/667a5c3a3fe0ec7016dbcf283c26ecc60aaa3b48.gif)

#### `hide()`

![](https://global.discourse-cdn.com/meta/original/4X/2/7/1/271975dca91623d862ad077d5f9496ba853e273b.gif)

很想听听大家的意见，看看该选择哪一个。😊

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年六月25日 22:58 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/12 "2015-06-25T22:58:13Z")

</div>

fade out fast seems fine to me.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2015年六月26日 15:30 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/13 "2015-06-26T15:30:05Z")

</div>

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

[https://github.com/discourse/discourse/pull/3571](https://github.com/discourse/discourse/pull/3571)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2015年七月3日 01:17 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/14 "2015-07-03T01:17:42Z")

</div>

> [@DeanMarkTaylor](#):
>
> But when you compare that to a site with a larger number of posts:

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 😄

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年七月3日 01:31 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/15 "2015-07-03T01:31:43Z")

</div>

> [@tgxworld](#):
>
> Could I get a rough count of how many posts was on the site?

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

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2015年七月21日 10:34 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/16 "2015-07-21T10:34:20Z")

</div>

Patch landed on master. 😄  
[https://github.com/discourse/discourse/commit/b0ea6764e0f1282e262182a3e1f048bd4b59d34f](https://github.com/discourse/discourse/commit/b0ea6764e0f1282e262182a3e1f048bd4b59d34f)

Both issue in this topic should be resolved.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年七月21日 10:41 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/17 "2015-07-21T10:41:47Z")

</div>



---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年七月21日 10:42 UTC](https://meta.discourse.org/t/about-page-slow-menu-slow-to-disapear/24635/18 "2015-07-21T10:42:29Z")

</div>

As fast as lightning ! thanks heaps ❤
