Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #14318 - Eh2406:wrap_is_not_cheap, r=epage
dont call wrap in a no-op source_id::with* ### What does this PR try to resolve? When running resolution in parallel (which my pubgrub tests do but cargo does not) there can be a lot of contention on the lock for constructing new `source_id`. When investigating much of this is due to `without_precise` in `encodable_package_id` in `check_duplicate_pkgs_in_lockfile`. There are many ways to solve this, the simplest seems to be to return `self` if the requested modification made no difference. ### How should we test and review this PR? All tests still pass and it's an internal re-factor. In addition running all crates on crates.io through cargoes resolver in parallel on 190 cores went from >20k sec cpu time to ~10k. ### Additional information
- Loading branch information