feat(tvix/castore): upload blobs concurrently when ingesting archives
Ingesting tarballs with a lot of small files is very slow because of the round trip time to the `BlobService`. To mitigate this, small blobs can be buffered into memory and uploaded concurrently in the background. Change-Id: I3376d11bb941ae35377a089b96849294c9c139e6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11497 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
parent
fa69becf4d
commit
79698c470c
2 changed files with 92 additions and 12 deletions
|
|
@ -168,7 +168,7 @@ async fn hash<D: Digest + std::io::Write>(
|
|||
|
||||
impl<BS, DS, PS> Fetcher<BS, DS, PS>
|
||||
where
|
||||
BS: AsRef<(dyn BlobService + 'static)> + Send + Sync,
|
||||
BS: AsRef<(dyn BlobService + 'static)> + Clone + Send + Sync + 'static,
|
||||
DS: AsRef<(dyn DirectoryService + 'static)>,
|
||||
PS: PathInfoService,
|
||||
{
|
||||
|
|
@ -242,7 +242,7 @@ where
|
|||
|
||||
// Ingest the archive, get the root node
|
||||
let node = tvix_castore::import::archive::ingest_archive(
|
||||
&self.blob_service,
|
||||
self.blob_service.clone(),
|
||||
&self.directory_service,
|
||||
archive,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue