bind9/lib/ns
Tony Finch 45b2d8938b
Simplify and speed up DNS name compression
All we need for compression is a very small hash set of compression
offsets, because most of the information we need (the previously added
names) can be found in the message using the compression offsets.

This change combines dns_compress_find() and dns_compress_add() into
one function dns_compress_name() that both finds any existing suffix,
and adds any new prefix to the table. The old split led to performance
problems caused by duplicate names in the compression context.

Compression contexts are now either small or large, which the caller
chooses depending on the expected size of the message. There is no
dynamic resizing.

There is a behaviour change: compression now acts on all the labels in
each name, instead of just the last few.

A small benchmark suggests this is about 2x faster.
2022-10-17 08:45:44 +02:00
..
include Add new recursion type for refreshing stale RRset 2022-10-05 08:20:48 +02:00
client.c Simplify and speed up DNS name compression 2022-10-17 08:45:44 +02:00
hooks.c Use designated initializers instead of memset()/MEM_ZERO for structs 2022-10-05 16:44:05 +02:00
interfacemgr.c when creating an interface, set magic before linking 2022-09-06 17:12:14 -07:00
listenlist.c Store HTTP quota size inside a listenlist instead of the quota 2022-06-28 15:42:38 +03:00
log.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
Makefile.am Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
notify.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
query.c Replace #define DNS_NAMEATTR_ with struct of bools 2022-10-13 17:04:02 +02:00
server.c Use designated initializers instead of memset()/MEM_ZERO for structs 2022-10-05 16:44:05 +02:00
sortlist.c Add isc_rwlock around dns_aclenv .localhost and .localnets member 2022-04-04 19:27:00 +02:00
stats.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
update.c Add and use semantic patch to replace isc_mem_get/allocate+memset 2022-10-05 16:44:05 +02:00
xfrout.c Simplify and speed up DNS name compression 2022-10-17 08:45:44 +02:00