mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
wvmStorage.update_volumes looked each volume up by name three times, read its info twice and its XML once: six round trips per volume to the host. It now lists the pool's volumes as objects (listAllVolumes) and reads each one's XML only (volume_details): name, capacity, allocation and format are all in it, and libvirt refreshes a volume for its XML as it does for info(). A pool of N volumes takes 2 + N calls instead of 2 + 6N; 100 volumes over SSH on a test host read in about 110 ms instead of 720 ms, with the same values. - A volume deleted between the listing and its read is left out; any other error is raised. Volumes come sorted by name. - get_volume_details (the API's one volume) reads it the same way. - Only a refused refresh (a clone running in the pool) is tolerated, not any exception. - The pool page reads its volumes and space only to render itself; its actions, which all redirect, no longer read every volume first. - get_volume_size and get_volume_allocation go: nothing else used them. |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| connection.py | ||
| create.py | ||
| hostdetails.py | ||
| instance.py | ||
| interface.py | ||
| libvirt-ssh | ||
| network.py | ||
| nwfilters.py | ||
| rwlock.py | ||
| storage.py | ||
| util.py | ||
| virtsecrets.py | ||