Disable case preservation when case-sensitive compression is disabled [ISC-support #13227]
Description
ISC Support Customer reports significant performance impact in some situations caused by case preservation.
Specifically:
- allocation of a new dns_name_t and name copy in dns_compress_add()
- name copy in rdataset.c:towiresorted() and call to dns_rdataset_getownercase()
Request
Admittedly these should be generally minor overhead, but in scenarios where the overall query processing is relatively cheap the performance drop can be non-negligible. Right now it exceeds the acceptable level of performance regression in our release engineering standard. If we suppress the above change the performance is (still worse than before but) acceptable.
Meanwhile, trying to preserve the case of the owner name is quite moot in practice if, for example, case-sensitive name compression is disabled. So we wonder if the case-preserving feature can be configurable at least when responding to normal queries. I'm attaching a patch (for 9.11.3-S2) that implements this idea, by disabling case-preserving when case-sensitive name compression is disabled (this could also be a separate configuration option).