71964ec7a8
This gives a 1.23 speedup on transformers-extras. We could change to
msgpack for the entire cache if we want. I only tried this format and
postcard so far, where postcard was much slower (like 1.6s).
I don't actually want to merge it like this, i wanted to figure out the
ballpark of improvement for switching away from json.
```
hyperfine --warmup 3 --runs 10 "target/profiling/puffin pip-compile --cache-dir cache-msgpack scripts/requirements/transformers-extras.in" "target/profiling/branch pip-compile scripts/requirements/transformers-extras.in"
Benchmark 1: target/profiling/puffin pip-compile --cache-dir cache-msgpack scripts/requirements/transformers-extras.in
Time (mean ± σ): 179.1 ms ± 4.8 ms [User: 157.5 ms, System: 48.1 ms]
Range (min … max): 174.9 ms … 188.1 ms 10 runs
Benchmark 2: target/profiling/branch pip-compile scripts/requirements/transformers-extras.in
Time (mean ± σ): 221.1 ms ± 6.7 ms [User: 208.1 ms, System: 46.5 ms]
Range (min … max): 213.5 ms … 235.5 ms 10 runs
Summary
target/profiling/puffin pip-compile --cache-dir cache-msgpack scripts/requirements/transformers-extras.in ran
1.23 ± 0.05 times faster than target/profiling/branch pip-compile scripts/requirements/transformers-extras.in
```
Disadvantage: We can't manually look into the cache anymore to debug
things
- [ ] Check more formats, i currently only tested json, msgpack and
postcard, there should be other formats, too
- [x] Switch over `CachedByTimestamp` serialization (for the interpreter
caching)
- [x] Switch over error handling and make sure puffin is still resilient
to cache failure
41 lines
1.3 KiB
TOML
41 lines
1.3 KiB
TOML
[package]
|
|
name = "puffin-client"
|
|
version = "0.0.1"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
distribution-filename = { path = "../distribution-filename" }
|
|
distribution-types = { path = "../distribution-types" }
|
|
install-wheel-rs = { path = "../install-wheel-rs" }
|
|
pep440_rs = { path = "../pep440-rs" }
|
|
puffin-cache = { path = "../puffin-cache" }
|
|
puffin-fs = { path = "../puffin-fs" }
|
|
puffin-normalize = { path = "../puffin-normalize" }
|
|
pypi-types = { path = "../pypi-types" }
|
|
|
|
async_http_range_reader = { workspace = true }
|
|
async_zip = { workspace = true, features = ["tokio"] }
|
|
fs-err = { workspace = true, features = ["tokio"] }
|
|
futures = { workspace = true }
|
|
http = { workspace = true }
|
|
http-cache-semantics = { workspace = true }
|
|
reqwest = { workspace = true }
|
|
reqwest-middleware = { workspace = true }
|
|
reqwest-retry = { workspace = true }
|
|
rmp-serde = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { workspace = true, features = ["fs"] }
|
|
tokio-util = { workspace = true }
|
|
tracing = { workspace = true }
|
|
url = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
pep508_rs = { path = "../pep508-rs" }
|
|
|
|
anyhow = { workspace = true }
|
|
tokio = { workspace = true, features = ["fs", "macros"] }
|