public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 0/4] gui/api performance improvements
@ 2025-09-05 11:51 Dominik Csapak
  2025-09-05 11:51 ` [pve-devel] [PATCH manager 1/4] API2Tools: rrd: remove O(n^2) lookup for keys Dominik Csapak
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Dominik Csapak @ 2025-09-05 11:51 UTC (permalink / raw)
  To: pve-devel

this series fixes a series of bad patterns in our api/gui code,
especially some O(n^2) code regarding resource count (vms/storages/etc.)

note that the api change is only a current stop-gap workaround and aaron
is working on making that code not necessary at all, but for now this
should be good.

The overall perforamnce improvement i see on my local test cluster with
~10000 vms is from

API ~22s + GUI ~8.5s

to

API 500ms + GUI 500ms

which is a ~30x speedup (since it's mostly quadratic code that is
removed, this is more noticable the more resources there are ofc)

Dominik Csapak (4):
  API2Tools: rrd: remove O(n^2) lookup for keys
  ui: fix O(n^2) calculations when loading /cluster/resources
  ui: resource tree: improve performance on initial update
  ui: resource tree: fix change detection

 PVE/API2Tools.pm                   |  7 +++----
 www/manager6/Utils.js              | 12 ++++--------
 www/manager6/data/ResourceStore.js | 20 ++++++++++++++++++++
 www/manager6/tree/ResourceTree.js  | 25 +++++++++++++++++++++++--
 4 files changed, 50 insertions(+), 14 deletions(-)

-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-05 17:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-05 11:51 [pve-devel] [PATCH manager 0/4] gui/api performance improvements Dominik Csapak
2025-09-05 11:51 ` [pve-devel] [PATCH manager 1/4] API2Tools: rrd: remove O(n^2) lookup for keys Dominik Csapak
2025-09-05 13:49   ` Aaron Lauterer
2025-09-05 13:53     ` Dominik Csapak
2025-09-05 13:58       ` Aaron Lauterer
2025-09-05 13:57   ` Daniel Kral
2025-09-05 11:52 ` [pve-devel] [PATCH manager 2/4] ui: fix O(n^2) calculations when loading /cluster/resources Dominik Csapak
2025-09-05 11:52 ` [pve-devel] [PATCH manager 3/4] ui: resource tree: improve performance on initial update Dominik Csapak
2025-09-05 11:52 ` [pve-devel] [PATCH manager 4/4] ui: resource tree: fix change detection Dominik Csapak
2025-09-05 17:40 ` [pve-devel] applied: [PATCH manager 0/4] gui/api performance improvements Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal