Hpack optimizations

If the dynamic table size is already 0, do not evictAll.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2020-05-20 10:47:23 +02:00
parent 3215e11b3f
commit 3845790c5d
1 changed files with 9 additions and 6 deletions

View File

@ -395,6 +395,8 @@ public class HpackContext
{
if (LOG.isDebugEnabled())
LOG.debug(String.format("HdrTbl[%x] evictAll", HpackContext.this.hashCode()));
if (size() > 0)
{
_fieldMap.clear();
_nameMap.clear();
_offset = 0;
@ -403,6 +405,7 @@ public class HpackContext
Arrays.fill(_entries, null);
}
}
}
public static class Entry
{