public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] file-restore: list: improve pxar v2 performance
@ 2024-06-10  8:39 Christian Ebner
  2024-06-10  9:53 ` [pbs-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2024-06-10  8:39 UTC (permalink / raw)
  To: pbs-devel

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>
---
 proxmox-file-restore/src/main.rs | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs
index a09873467..3dc2b3fd9 100644
--- a/proxmox-file-restore/src/main.rs
+++ b/proxmox-file-restore/src/main.rs
@@ -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);
 
-- 
2.39.2



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


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

end of thread, other threads:[~2024-06-10  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-10  8:39 [pbs-devel] [PATCH proxmox-backup] file-restore: list: improve pxar v2 performance Christian Ebner
2024-06-10  9:53 ` [pbs-devel] applied: " Fabian Grünbichler

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