Skip to content

Conversation

@lucab
Copy link
Contributor

@lucab lucab commented Feb 20, 2024

This tweaks the request path parsing logic (in server role) in order to perform zero-copy URI parsing.

Closes: #3574

@lucab lucab marked this pull request as draft February 20, 2024 09:07
@lucab lucab force-pushed the ups/uri-parse-zerocopy branch 3 times, most recently from 627dac7 to 977d42e Compare February 20, 2024 09:46
@lucab lucab marked this pull request as ready for review February 20, 2024 10:13
This tweaks the request path parsing logic (in server role) in order
to perform zero-copy URI parsing.
@lucab lucab force-pushed the ups/uri-parse-zerocopy branch from 977d42e to bc28ba7 Compare February 20, 2024 14:00
@seanmonstar seanmonstar merged commit 724bde7 into hyperium:master Feb 21, 2024
let bytes_ptr = bytes.as_ptr() as usize;
let start = req_path.as_ptr() as usize - bytes_ptr;
let end = start + req_path.len();
std::ops::Range { start, end }
Copy link
Contributor

Choose a reason for hiding this comment

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

This can just be start..end fyi

@lucab lucab deleted the ups/uri-parse-zerocopy branch June 10, 2024 17:06
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.

proto/h1: spurious copy-allocation in request parsing hotpath

3 participants