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

perf(ext/fetch): Use the WebIDL conversion to DOMString rather than USVString for Response constructor #12093

Closed
wants to merge 1 commit into from

Conversation

lmalheiro
Copy link
Contributor

Fixes performance issue #12090

Added benchmark response_string which produced the following results before and after the change:

  • using USVString:
Benchmark #13: /home/luismalheiro/projects/deno_pr/target/release/deno run cli/tests/testdata/response_string_perf.js 
  Time (mean ± σ):     432.9 ms ±  26.8 ms    [User: 308.8 ms, System: 192.8 ms]
  Range (min … max):   409.5 ms … 485.4 ms    10 runs
  • using DOMString:
Benchmark #13: /home/luismalheiro/projects/deno_pr/target/release/deno run cli/tests/testdata/response_string_perf.js 
  Time (mean ± σ):     175.8 ms ±  17.6 ms    [User: 168.6 ms, System: 73.9 ms]
  Range (min … max):   147.3 ms … 211.6 ms    18 runs

Notice that the difference will increase non-linearly for large strings.

@CLAassistant
Copy link

CLAassistant commented Sep 16, 2021

CLA assistant check
All committers have signed the CLA.

@lmalheiro
Copy link
Contributor Author

Withdrawing it to sort out CLA issues and CI failures. Sorry for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants