DescriptionHPACK: Refactor and expand HpackHeaderTable indexing.
HpackHeaderTable now maintains indices for querying static and dynamic
entries by name and name & value. Indicies are ordered on entry name,
value, then table index. A full-table index is maintained, as well as a
reference-set index.
HpackEntry no longer tracks reference-set status (that's HpackHeaderTable's
job), and the "touch" mechanism has been replaced with a similar "state".
HpackHeaderTable & HpackEntry also now cooperate to provide HpackEntry with
sufficient bookmarking to compute it's own index.
HpackEncodingContext has been eliminated. HpackHeaderTable manages its
former responsibilities (primarly managing the static table).
Together, these changes allow an encoder to:
* Build the encoding delta via a linear walk through (just) the reference set
(assuming headers are already sorted, ala std::map).
* Map representations to entries in O(log(N)) time, preferring the
lowest-index entry.
* Determine a mapped entry's index in O(1) time.
* Add and evict representations to the dynamic table in O(log(N)) time.
* Efficiently enumerate all headers having a specific name. Not required now,
but may be in the future.
This lands server change 65185410 by jgraettinger.
BUG=339578
Patch Set 1 #Patch Set 2 : Add NET_EXPORT_PRIVATE on HpackEntry::Comparator #
Messages
Total messages: 2 (0 generated)
|