]> git.proxmox.com Git - cargo.git/commit
Turn `Workspace::is_member` into an `O(1)` query
authorAlex Crichton <alex@alexcrichton.com>
Mon, 22 Apr 2019 23:01:58 +0000 (16:01 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 22 Apr 2019 23:01:58 +0000 (16:01 -0700)
commitf660b3e464f33ff26d931b1c22fac81481ea03a6
treeed5cce08de1a1e5b82857fa6875e8787f385815e
parente45444665c99e3df468a00addee2ce3e239d003f
Turn `Workspace::is_member` into an `O(1)` query

This commit moves it from a linear query which does a lot of hashing of
`PathBuf` to an `O(1)` query that only hashes `PackageId`. This improves
Servo's null build performance by 50ms or so, causing a number of
functions to disappear from profiles.
src/cargo/core/workspace.rs