quiche icon indicating copy to clipboard operation
quiche copied to clipboard

Fix time consuming error without --dump-response argument

Open Geun-Oh opened this issue 2 months ago • 0 comments

HI Cloudflare Team.

Related

This issue related with #2200

Description

When we don't use --dump-response overall time delays because of copying & converting types into String.

So I this issue fixes error by writing stdout even if we do not use --dump-response.

Error Reproduce

Make dump file

dd if=/dev/zero of=/tmp/1GB.bin bs=1M count=1024

Open the server

cargo run --bin quiche-server -- \
--listen 127.0.0.1:4433 \
--cert apps/src/bin/cert.crt \
--key apps/src/bin/cert.key \
--root /tmp

Request with --dump-response

time cargo run --bin quiche-client -- \
https://127.0.0.1:4433/1GB.bin --no-verify \
--dump-responses /tmp

Request without --dump-response

time cargo run --bin quiche-client -- \
https://127.0.0.1:4433/1GB.bin --no-verify

===

We can check it takes more time when not using --dump-response

time cargo run --bin quiche-client -- \
https://127.0.0.1:4433/1GB.bin --no-verify
   Compiling quiche_apps v0.1.0 (/Users/ohyeong-geun/rust/quiche/apps)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.54s
     Running `target/debug/quiche-client 'https://127.0.0.1:4433/1GB.bin' --no-verify`
cargo run --bin quiche-client -- https://127.0.0.1:4433/1GB.bin --no-verify  5.43s user 8.30s system 81% cpu 16.792 total
time cargo run --bin quiche-client -- \
https://127.0.0.1:4433/1GB.bin --no-verify \
--dump-responses /tmp
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.27s
     Running `target/debug/quiche-client 'https://127.0.0.1:4433/1GB.bin' --no-verify --dump-responses /tmp`
cargo run --bin quiche-client -- https://127.0.0.1:4433/1GB.bin --no-verify    0.15s user 0.08s system 31% cpu 0.729 total

Geun-Oh avatar Oct 25 '25 13:10 Geun-Oh