Benchmarks for cargo-public-api and related crates.
Currently experimental.
Here is a list of things that probably would significantly improve the performance of the public-api crate:
- Make
UnprocessedItem::parent_pathcontainVec<Rc<PathComponent>>instead ofVec<PathComponent>. That should give a noticeble performance boost sincePathComponentis cloned a lot, and wrapping it inside of anRcshould significantly reduce the number of heap allocations. - Use multiple threads to process
ItemProcessor::work_queue(and useArcinstead ofRcabove) - Instead of rendering
impls to group them in the output (which according to my profiling takes a long time), use something like aDisambiguatedDefPathDatawith adisambiguator: u32.