Wp-calypso: Posts: Remove view counts from blog posts list as they consume excessive network and database resources

Created on 15 Aug 2018  ยท  21Comments  ยท  Source: Automattic/wp-calypso

The view counts from the blog posts list result in a single /stats/post network request for each post in the list, as well as multiple SQL queries on the backend for each /stats/post request. This is highly inefficient and not acceptable performance both for customers' devices as well as our servers.

The "X Views" counts will be removed from posts in the blog posts list. It may return in some fashion in the future should customer needs require it and it can be implemented in an efficient manner.

Before:

screencapture at wed aug 15 13 21 39 edt 2018

After:

screencapture at wed aug 15 13 22 45 edt 2018

See internal discussion for more details: p8F9tW-RX-p2


Acceptance critieria

1.

  • Given a site with blog posts with views
  • When Blog Posts is visited
  • Then the "X Views" counts are not present on the post items in the list

2.

  • Given a site with blog posts with views
  • When Blog Posts is visited
  • Then no /stats/post requests are made for individual posts

3.

  • Given a customer with multiple sites with blog posts with views
  • When Blog Posts is visited in All My Sites mode
  • Then the "X Views" counts are not present on the post items in the list

4.

  • Given a customer with multiple sites with blog posts with views
  • When Blog Posts is visited in All My Sites mode
  • Then no /stats/post requests are made for individual posts
Performance Posts Stats

Most helpful comment

To clarify, like data is not stored alongside post data, but is stored in a more query-friendly manner than stats because we do not usually break them out over days.

All 21 comments

Just mentioning here that user in 3676429-hc would like to see this feature back

5740736-hc: Noting that this user wanted to see the same back as well.

Another complaint about this in 1350057-zen

5746530-hc - User will miss the feature but "I will survive LOL"

Were mostly relieved to know that it wasn't something they had accidentally turned off.

Another user mentioned about missing it: #5120254-hc

Edit: Suggested to inform of these changes.

Another user misses this feature: #5796234-hc

Another user missing this feature #1895467-hc

Asked about this: #1363353-zen

4022551-hc

Another user who would like to see this feature come back #1364730-zen

1364857-zen - another request for views to stay

Another one in #1066876-hc

2427209-hc would like to see it back.

26894 has been opened up to track the potential re-introduction of this functionality.

6005018-hc is upset about this having been removed and would like to have it back.

I'm upset they've removed this. Now I do not know how many people are viewing my blogs. As I said before, it's very time consuming and cumbersome to have to click on the three dots, and et cetera et cetera -- and even after counting all the numbers up, I see they only go to a certain extent -- they don't show all the hits each of my blogs has gotten.

6032838-hc wants it back

Yep. Also have another customer with the same:

2255431-hc

I agree it's better to not have this cause the dashboard to be impacted so much, so maybe if we can look into at least allowing customers to just filter by posts instead of Posts & Pages in the Stats section of the Dashboard would be a good alternative.
Customers just want an easy way to see total views at a glance somewhere.

One thing that has come up in the forums a few times is the question about why the "like" count is still shown but the "views" count is gone.

@jmdodd mentioned to me that this was because we store the like count in the same table as the post data (at least I think that's what was said).

From a user/UX experience I can see how this could be confusing when one count is removed but the other remains. It did give me an idea though, I'm not sure how technically plausible this is because I know adding new columns in the DB is a bit of task but would storing a cached number of views in the database work here?

Edit: Oops! I now see #26894 and will follow that one :)

To clarify, like data is not stored alongside post data, but is stored in a more query-friendly manner than stats because we do not usually break them out over days.

In #27090, we introduced a new "Recent Views" glance that shows a post's views in the last 30 days (if they have any) and links to the post's full stats page.

Was this page helpful?
0 / 5 - 0 ratings