Skip to content

Performance opportunities #1690

@larseggert

Description

@larseggert
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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions