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 '<span></span>' 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 <[email protected]> --- 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 [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
