Skip to content

Commit

Permalink
perf(transport): remove Server::timers (#1784)
Browse files Browse the repository at this point in the history
* perf(transport): remove Server::timers

The current `neqo_transport::server::Server::timers` has a large performance
overhead, especially when serving small amount of connections. See
#1780 for details.

This commit optimizes for the small-number-of-connections case, keeping a single
callback timestamp only, iterating each connection when there is no other work
to be done.

* Cleanups

* Rename to wake_at

* Introduce ServerConnectionState::{set_wake_at,needs_waking,woken}
  • Loading branch information
mxinden authored Apr 4, 2024
1 parent 301ebe4 commit 61fcd28
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 509 deletions.
4 changes: 0 additions & 4 deletions neqo-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,3 @@ features = ["timeapi"]
[lib]
# See https://github.com/bheisler/criterion.rs/blob/master/book/src/faq.md#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
bench = false

[[bench]]
name = "timer"
harness = false
39 changes: 0 additions & 39 deletions neqo-common/benches/timer.rs

This file was deleted.

1 change: 0 additions & 1 deletion neqo-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub mod hrtime;
mod incrdecoder;
pub mod log;
pub mod qlog;
pub mod timer;
pub mod tos;

use std::fmt::Write;
Expand Down
Loading

0 comments on commit 61fcd28

Please sign in to comment.