-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid serializing if lockfile does not change (#4945)
## Summary Avoid serializing and writing the lockfile if a cheap comparison shows that the contents have not changed. ## Test Plan Shaves ~10ms off of #4860 for me. ``` ➜ transformers hyperfine "../../uv/target/profiling/uv lock" "../../uv/target/profiling/baseline lock" --warmup 3 Benchmark 1: ../../uv/target/profiling/uv lock Time (mean ± σ): 130.5 ms ± 2.5 ms [User: 130.3 ms, System: 85.0 ms] Range (min … max): 126.8 ms … 136.9 ms 23 runs Benchmark 2: ../../uv/target/profiling/baseline lock Time (mean ± σ): 140.5 ms ± 5.0 ms [User: 142.8 ms, System: 85.5 ms] Range (min … max): 133.2 ms … 153.3 ms 21 runs Summary ../../uv/target/profiling/uv lock ran 1.08 ± 0.04 times faster than ../../uv/target/profiling/baseline lock ```
- Loading branch information
1 parent
dc80fdb
commit 8c9bd70
Showing
3 changed files
with
34 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters