-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
diff --git a/neqo-common/src/udp.rs b/neqo-common/src/udp.rs
index 7ad0b976..ded473cb 100644
--- a/neqo-common/src/udp.rs
+++ b/neqo-common/src/udp.rs
@@ -71,6 +71,8 @@ impl Socket {
/// Receive a UDP datagram on the specified socket.
pub fn recv(&self, local_address: &SocketAddr) -> Result<Option<Datagram>, io::Error> {
+ // TODO: The next line uses about 7% of CPU time on neqo-client to zero out the buffer.
+ // Figure out a way to avoid this.
let mut buf = [0; u16::MAX as usize];
let mut meta = RecvMeta::default();
diff --git a/neqo-transport/src/recv_stream.rs b/neqo-transport/src/recv_stream.rs
index 5da80d60..518ee45d 100644
--- a/neqo-transport/src/recv_stream.rs
+++ b/neqo-transport/src/recv_stream.rs
@@ -364,6 +364,8 @@ impl RxStreamOrderer {
keep = true;
}
if keep {
+ // TODO: We're spending about 4% of client CPU time in `split_off`, and almost 8%
+ // in this `read` function. Optimize.
let mut keep = self.data_ranges.split_off(&range_start);
mem::swap(&mut self.data_ranges, &mut keep);
return copied;Metadata
Metadata
Assignees
Labels
No labels