Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add optimisation for http cache #216

Merged
merged 22 commits into from
Feb 13, 2024

Conversation

nichmor
Copy link
Collaborator

@nichmor nichmor commented Feb 12, 2024

  • add tests for cache BOM updating

Benchmark: with cache but without Buf Writer and Reader

sudo hyperfine --warmup 3 'cargo run --release -- quetz-server'
Benchmark 1: cargo run --release -- quetz-server
  Time (mean ± σ):      1.826 s ±  0.106 s    [User: 0.455 s, System: 2.784 s]
  Range (min … max):    1.697 s …  2.029 s    10 runs



Benchmark: with cache and with Buf Writer and Reader optimisation

sudo hyperfine --warmup 3 'cargo run --release -- quetz-server'
Benchmark 1: cargo run --release -- quetz-server
  Time (mean ± σ):      1.441 s ±  0.104 s    [User: 0.440 s, System: 0.169 s]
  Range (min … max):    1.270 s …  1.584 s    10 runs

Benchmark: with cache but without Buf Writer and Reader

sudo hyperfine --warmup 3 'cargo run --release -- flask'
Benchmark 1: cargo run --release -- flask
  Time (mean ± σ):      1.379 s ±  0.183 s    [User: 0.201 s, System: 0.274 s]
  Range (min … max):    1.132 s …  1.665 s    10 runs

Benchmark: with cache and with Buf Writer and Reader optimisation

sudo hyperfine --warmup 3 'cargo run --release -- flask'
Benchmark 1: cargo run --release -- flask
  Time (mean ± σ):      1.246 s ±  0.348 s    [User: 0.204 s, System: 0.110 s]
  Range (min … max):    0.963 s …  2.057 s    10 runs

Benchmark: with cache but without Buf Writer and Reader

sudo hyperfine --warmup 3 './target/release/rip flask'
Benchmark 1: ./target/release/rip flask
  Time (mean ± σ):     793.0 ms ± 160.6 ms    [User: 99.6 ms, System: 212.6 ms]
  Range (min … max):   650.0 ms … 1173.9 ms    10 runs
  

Benchmark: with cache and with Buf Writer and Reader optimisation

sudo hyperfine --warmup 3 './target/release/rip flask'
Benchmark 1: ./target/release/rip flask
  Time (mean ± σ):     693.3 ms ± 148.0 ms    [User: 108.2 ms, System: 44.3 ms]
  Range (min … max):   506.9 ms … 949.4 ms    10 runs
  

crates/rattler_installs_packages/src/index/http.rs Outdated Show resolved Hide resolved
crates/rattler_installs_packages/src/index/http.rs Outdated Show resolved Hide resolved
crates/rattler_installs_packages/src/index/http.rs Outdated Show resolved Hide resolved
@tdejager tdejager merged commit cc6856f into prefix-dev:main Feb 13, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants