Skip to content
New issue

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

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

Already on GitHub? # to your account

perf(ext/fetch): speed up resp.clone() #24812

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

lucacasonato
Copy link
Member

@lucacasonato lucacasonato commented Jul 31, 2024

main (before)

Running 10s test @ http://localhost:8000
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   123.96us   57.25us   3.64ms   96.84%
    Req/Sec    41.15k     2.11k   42.76k    95.05%
  827087 requests in 10.10s, 125.41MB read
Requests/sec:  81895.64
Transfer/sec:     12.42MB

this branch

Running 10s test @ http://localhost:8000
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    66.91us   17.71us   2.03ms   95.91%
    Req/Sec    74.43k     2.52k   76.71k    92.57%
  1496402 requests in 10.10s, 199.79MB read
Requests/sec: 148170.16
Transfer/sec:     19.78MB

Fixes #24766

@lucacasonato lucacasonato requested a review from littledivy July 31, 2024 14:09
@lucacasonato lucacasonato force-pushed the make_response_clone_fast branch from b285494 to f6767b1 Compare July 31, 2024 14:25
Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lucacasonato lucacasonato merged commit b153065 into denoland:main Jul 31, 2024
17 checks passed
crowlKats pushed a commit that referenced this pull request Jul 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response.clone() is slower than returning a new Response
3 participants