Skip to content

Reading is very slow for larger files #57

@jon-zu

Description

@jon-zu

I'm using the msi crate, but after some profiling, I think this crate might be the better place to report that.

Code:

        let setup_file = BufReader::new(File::open("out_is/Setup.msi").unwrap());
        let mut msi = msi::Package::open(setup_file).unwrap();
        let mut stream = msi.read_stream("Data1.cab").unwrap();
        let mut max = stream.take(1024 * 1024 * 50); 
        let mut out_dir = BufWriter::new(File::create("out_is/Data1.cab").unwrap());
        std::io::copy(&mut max, &mut out_dir).unwrap();

Reading 50 Mb of that cab stream takes roughly one minute on my pc. I've also created a flame graph, but I'm not really sure where the problem lies. Is the loop in Chain::new taking a lot of time maybe?
flamegraph

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions