mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-03 09:44:05 +00:00
file-restore: list: improve pxar v2 performance
Do not attach the payload reader for split pxar archives, as only the metadata has to be accessed for listing. This avoids that the decoder performs consistency checks with the payload stream, which require chunk download and decoding, making the listing unusable slow. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
8834153187
commit
3c9a29e5cf
@ -170,7 +170,7 @@ async fn list_files(
|
||||
path = vec![b'/'];
|
||||
}
|
||||
|
||||
let (archive_name, payload_archive_name) =
|
||||
let (archive_name, _payload_archive_name) =
|
||||
pbs_client::tools::get_pxar_archive_names(&file, &manifest)?;
|
||||
|
||||
let (reader, archive_size) = get_remote_pxar_reader(
|
||||
@ -181,19 +181,8 @@ async fn list_files(
|
||||
)
|
||||
.await?;
|
||||
|
||||
let reader = if let Some(payload_archive_name) = payload_archive_name {
|
||||
let (payload_reader, payload_size) = get_remote_pxar_reader(
|
||||
&payload_archive_name,
|
||||
client,
|
||||
&manifest,
|
||||
crypt_config,
|
||||
)
|
||||
.await?;
|
||||
pxar::PxarVariant::Split(reader, (payload_reader, payload_size))
|
||||
} else {
|
||||
pxar::PxarVariant::Unified(reader)
|
||||
};
|
||||
|
||||
// only care about the metadata, don't attach a payload reader
|
||||
let reader = pxar::PxarVariant::Unified(reader);
|
||||
let accessor = Accessor::new(reader, archive_size).await?;
|
||||
let path = OsStr::from_bytes(&path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user