mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05:00
perf(ext/http): faster req_url string assembly (#11711)
This stood out on a flamegraph, it took up ~1% of a profiled loadtest of `cli/bench/deno_http_native.js`
This commit is contained in:
parent
2d578ea54a
commit
18ff6bb053
1 changed files with 1 additions and 1 deletions
|
@ -283,7 +283,7 @@ fn req_url(
|
|||
Cow::Owned(addr.to_string())
|
||||
};
|
||||
let path = req.uri().path_and_query().map_or("/", |p| p.as_str());
|
||||
Ok(format!("{}://{}{}", scheme, host, path))
|
||||
Ok([scheme, "://", &host, path].concat())
|
||||
}
|
||||
|
||||
fn req_headers(
|
||||
|
|
Loading…
Reference in a new issue