Skip to content

Use BufReader when loading files for a big speedup #7

Description

@jornvandebeek

Hey, first of all, thanks for making this crate, it works great and is well documented.

I wanted to quickly share that using a buffered reader on the Files speeds loading up by a big amount, for me on windows at least.

So, for example this:

use std::io::BufReader;
...
let file = BufReader::new(File::open(f).expect("level file not found"));

instead of this:

let file = File::open(f).expect("level file not found");

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