Skip to content

Fix time consuming error without --dump-response argument #2220

@Geun-Oh

Description

@Geun-Oh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions