frewsxcv / rust-crates-index

Rust library for retrieving and interacting with the crates.io index
https://docs.rs/crates-index/
Apache License 2.0
72 stars 37 forks source link

Generate path instead of searching for it #30

Closed kornelski closed 5 years ago

kornelski commented 5 years ago

I've had

for path in index.crate_index_paths() {
   let k = Crate::new(path);
}

and discovered it was O(n²) expensive (scanning the index 30001 times), yikes!