From 2ecf7ff5c9ce6bbc60593349bb8ac752dcbc63a0 Mon Sep 17 00:00:00 2001 From: Chris Raible Date: Mon, 20 Jan 2025 17:34:04 -0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20degraded=20database?= =?UTF-8?q?=20performance=20when=20using=20the=20Post=20Analytics=20screen?= =?UTF-8?q?=20(#22031)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref https://linear.app/ghost/issue/ONC-717/support-escalation-re-dashboard-unresponsive This reverts commit 9082a9f1db1d44026013a8cc8f0dee27e06e1486, which introduced an automatic refresh interval on the Post Analytics screen in Admin. This change led to an increase in the number of requests to the `/ghost/api/admin/members/events/` endpoint, which is a particularly database intensive endpoint. Ultimately this led to significantly higher load on the database which degraded performance for sites with a large `email_recipients` table. --- ghost/admin/app/components/posts/analytics.hbs | 8 ++++++++ ghost/admin/app/components/posts/analytics.js | 13 +------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/ghost/admin/app/components/posts/analytics.hbs b/ghost/admin/app/components/posts/analytics.hbs index 3accdb48da..64d91bbaa1 100644 --- a/ghost/admin/app/components/posts/analytics.hbs +++ b/ghost/admin/app/components/posts/analytics.hbs @@ -35,6 +35,14 @@ {{/let}}
+ {{#unless this.post.emailOnly}}