Skip to content

Commit

Permalink
Merge pull request #4389 from wasmerio/remove-mem-footprint
Browse files Browse the repository at this point in the history
remove memory footprint computation
  • Loading branch information
Michael Bryan authored Jan 4, 2024
2 parents b914717 + 8bc38e6 commit 59577e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion lib/wasix/src/bin_factory/binary_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub struct BinaryPackage {
pub commands: Vec<BinaryPackageCommand>,
pub uses: Vec<String>,
pub version: Version,
pub module_memory_footprint: u64,
pub file_system_memory_footprint: u64,
}

Expand Down
5 changes: 0 additions & 5 deletions lib/wasix/src/runtime/package_loader/load_package_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ pub async fn load_package_tree(
commands(&resolution.package.commands, &containers, resolution)?;

let file_system_memory_footprint = count_file_system(&fs, Path::new("/"));
let atoms_in_use: HashSet<_> = commands.iter().map(|cmd| cmd.atom()).collect();
let module_memory_footprint = atoms_in_use
.iter()
.fold(0, |footprint, atom| footprint + atom.len() as u64);

let loaded = BinaryPackage {
package_name: root.package_name.clone(),
Expand All @@ -64,7 +60,6 @@ pub async fn load_package_tree(
webc_fs: Arc::new(fs),
commands,
uses: Vec::new(),
module_memory_footprint,
file_system_memory_footprint,
};

Expand Down

0 comments on commit 59577e7

Please sign in to comment.