Currently in the bootstrap we are reading the entire archive into memory inorder to read the members:
fn is_aix_shared_archive(path: &Path) -> bool {
// reading the entire file as &[u8] into memory seems excessive
// look into either mmap it or use the &CacheReader
let data = match fs::read(path) {
Ok(data) => data,
Err(_) => return false,
};
let file = match ArchiveFile::parse(&*data) {
Ok(file) => file,
Err(_) => return false,
};
file.members()
.filter_map(Result::ok)
.any(|entry| String::from_utf8_lossy(entry.name()).contains(".so"))
}
Find an easy way to either memory map the file or something else. Because currently this can take up to a second or two to read the larger dylibs into memory.
Currently in the bootstrap we are reading the entire archive into memory inorder to read the members:
Find an easy way to either memory map the file or something else. Because currently this can take up to a second or two to read the larger dylibs into memory.