forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quic: don't create one task for each tx, create one per connection
Before quinn-rs/quinn#2002 we could get streams fragmented and out of order (stream concurrency). Now streams always come in order, so there's no reason anymore to spawn multiple tasks to read them. Before we could have: [s1][s2][s3][s2 fin][s3 fin][s1 fin] So spawning multiple tasks led to overall faster ingestion, since to complete s1 we didn't have to waiy for all the other streams to arrive. Now we always have: [s1 fin][s2 fin][s3 fin] So there's no reason to spawn a task per stream: each task will be created, read all its stream's chunks, exit, before the next stream arrives. This change removes the per-stream task and instead uses the connection task to read all the streams. This removes the CPU cost of creating tasks and the corresponding memory allocations.
- Loading branch information
1 parent
537e438
commit 4c2c4ef
Showing
1 changed file
with
48 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters