forked from proxmox-mirrors/proxmox-backup
Currently we always touch all files for each snapshot in a group when
listing them, even though we don't need all that info.
We're only interested in getting either the last finished snapshot
information, or the last unfinished one (which must the only one in
normal use, we can't have multiple unfinished snapshots usually)
Instead of getting all the information upfront, use the snapshot
iterator of the group to get only the id, sort them by time, and
use the first we're interested in, getting the snapshot specific info
only for those we want to check.
In my (admittedly extreme) setup with ~600 groups with ~1000 snapshots
each, this changes the time this api call needs from ~40s to <1s on a
relatively fast disk.
While at it, lift the restriction of only returning groups with
snapshots in them, now returning also empty ones.
To keep api compatibility, use a timestamp of 0 for those, as no valid
backup could have been made at that time anyway.
This API call is currently used by the web UI to add the group notes
to the backup snapshot tree in the datastore content view, so while it
will help in a few cases, it will not make the listing of all
snapshots itself faster.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| acme | ||
| api2 | ||
| backup | ||
| bin | ||
| config | ||
| server | ||
| tape | ||
| tools | ||
| auth_helpers.rs | ||
| auth.rs | ||
| client_helpers.rs | ||
| lib.rs | ||
| traffic_control_cache.rs | ||