From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id A5E371FF15C for ; Fri, 5 Sep 2025 14:06:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C52CE13BD7; Fri, 5 Sep 2025 14:06:38 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 5 Sep 2025 13:52:02 +0200 Message-ID: <20250905120627.2585826-5-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250905120627.2585826-1-d.csapak@proxmox.com> References: <20250905120627.2585826-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.023 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager 4/4] ui: resource tree: fix change detection X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" when trying to detect changes of resources, we compare a list of properties of the existing nodes in the tree with the ones we got from the api call, so that we can update only those that changed. One of these properties is the 'text' one, which is calculated from e.g. the vmid and name (or the name and host, depending on the type). Sadly, when inserting/updating the node, we modified the text property in every case, at least adding a '' around the existing text. This meant that every resource was updated every time instead of only when something changed. To fix this, remote the 'text' property from the to checked ones, and add all the properties that are used to compile the text one. This reduces the time of updateTree in my test-setup (~10000 guests) when nothing changed from ~100ms to ~15ms and reduces scroll stutter during such an update. Signed-off-by: Dominik Csapak --- www/manager6/tree/ResourceTree.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js index f9f711b6..7a8d00c0 100644 --- a/www/manager6/tree/ResourceTree.js +++ b/www/manager6/tree/ResourceTree.js @@ -291,7 +291,11 @@ Ext.define('PVE.tree.ResourceTree', { let stateid = 'rid'; const changedFields = [ - 'text', + 'disk', + 'maxdisk', + 'vmid', + 'name', + 'type', 'running', 'template', 'status', -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel