Skip to content

Commit

Permalink
image-rs: make tar reader async
Browse files Browse the repository at this point in the history
before this commit, tar reader is sync, thus we need a separate thread
for every image layer pulling green thread. This would cost more memory
and CPU resource.

This commit replace the tar crate to async version, thus we do not need
another thread to handle this to decrease memory occupation.

Signed-off-by: Xynnn007 <[email protected]>
  • Loading branch information
Xynnn007 committed Jun 30, 2024
1 parent d58ddef commit 3abc2ed
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 161 deletions.
64 changes: 44 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion image-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sha2.workspace = true
sigstore = { git = "https://github.com/sigstore/sigstore-rs.git", rev = "1b6ccf0f64d173350ec5515bd69ab48a26a9c0a3", default-features = false, optional = true }
strum.workspace = true
strum_macros = "0.26"
tar = "0.4.37"
krata-tokio-tar = "0.4.0"
tokio.workspace = true
tokio-util = "0.7.10"
tonic = { workspace = true, optional = true }
Expand Down
Loading

0 comments on commit 3abc2ed

Please sign in to comment.