Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove direct Instant::now() calls #433

Open
birneee opened this issue Dec 16, 2024 · 0 comments
Open

Remove direct Instant::now() calls #433

birneee opened this issue Dec 16, 2024 · 0 comments

Comments

@birneee
Copy link

birneee commented Dec 16, 2024

Tquic currently calls Instant::now() in various places, e.g. connection.rs or endpoint.rs.
Moving time management from tquic to the applications would make the state machine more deterministic, which would improve testability and performance.
Also, the time granularity could be controlled by the application.

Automated tests that require timed events would be simpler.

In my sender performance profiling, currently about 2% of the recorded samples are now() calls, this could be reduced.

For example the signature of send(&mut self, out: &mut [u8]) could be changed to send(&mut self, out: &mut [u8], now: Instant).

Related issue: cloudflare/quiche#1828

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

No branches or pull requests

1 participant