From f713cc784268ae6e6b21172486cda6db779b88f2 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 16 Jun 2021 19:01:55 +0530 Subject: [PATCH] fix: Throttle set_open_count set_open_count is called everytime form refresh is called. Form links don't update frequently, so it can be throttled. --- frappe/public/js/frappe/form/dashboard.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/public/js/frappe/form/dashboard.js b/frappe/public/js/frappe/form/dashboard.js index c1c95d94cf..eb7a6edc5d 100644 --- a/frappe/public/js/frappe/form/dashboard.js +++ b/frappe/public/js/frappe/form/dashboard.js @@ -5,6 +5,7 @@ frappe.ui.form.Dashboard = class FormDashboard { constructor(opts) { $.extend(this, opts); this.setup_dashboard_sections(); + this.set_open_count = frappe.utils.throttle(this.set_open_count, 500); } setup_dashboard_sections() {