1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-04-18 17:24:03 +03:00

2 Commits

Author SHA1 Message Date
Alan Frindell
43af96e4f9 Add toLogFields for logging
Summary: This will be needed by logging components - eg QLog

Reviewed By: hanidamlaj

Differential Revision: D72476485

fbshipit-source-id: 3b7f3e81e87fc6cc2a252293208863d33bd5df50
2025-04-07 17:37:39 -07:00
Alan Frindell
f9e9ad0443 HTTPPriorityQueue
Summary:
This is a reimplementation of the HTTP priority queue with the new API. The new design is:

A single vector-based heap for sequential streams across all levels and an array of 8 RoundRobin's that hold incremental streams.

Getting the highest priority element doesn't require iterating through empty levels - it's right at the front of `heap_` or `roundRobins_[lowestRoundRobin_]`.

There's an index map which incremental streams always use, the value is an index into roundRobins_.  When there are a large number of sequential streams in the heap_, we also index those (with their array index).

The benchmarks (next diff) show that this is 2x faster for 8 streams and 20% slower for large numbers of sequential streams (96).  The break-even point is 40 streams.

Reviewed By: mjoras

Differential Revision: D68641759

fbshipit-source-id: 30ea5c719e998ead20d8762ee5ddad10111ea7e5
2025-02-20 11:13:36 -08:00