1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-01 16:36:06 +00:00

perf(vrtManager): a pool's size is read with one info call

get_size() called pool.info() twice for its capacity and free space, two libvirt calls on every pool page and API read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
catborise 2026-11-08 12:03:39 +03:00
parent 235b4ad285
commit 7b5ccff8f5
2 changed files with 8 additions and 1 deletions

View file

@ -155,7 +155,8 @@ class wvmStorage(wvmConnect):
return "Unknown"
def get_size(self):
return [self.pool.info()[1], self.pool.info()[3]]
_state, capacity, _allocation, available = self.pool.info()
return [capacity, available]
def _XMLDesc(self, flags):
return self.pool.XMLDesc(flags)