Skip to content

Commit 1dd4274

Browse files
authored
perf: do no load in RAM files in autopack (#32)
Signed-off-by: Jérémy Audiger <jeremy.audiger@icloud.com>
1 parent eb81387 commit 1dd4274

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • crates/brioche-autopack/src

crates/brioche-autopack/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,12 +1050,9 @@ fn add_named_blob_from(
10501050
let mode = permissions.mode();
10511051
let is_executable = mode & 0o111 != 0;
10521052

1053-
let mut contents = vec![];
1054-
file.read_to_end(&mut contents)?;
1055-
10561053
let resource_path = brioche_resources::add_named_blob(
10571054
&ctx.config.resource_dir,
1058-
std::io::Cursor::new(contents),
1055+
&mut file,
10591056
is_executable,
10601057
alias_name,
10611058
)?;

0 commit comments

Comments
 (0)