]> git.ipfire.org Git - thirdparty/pdns.git/commit
Fix API performance: one DNSSECKeeper per request
authorKonrad Wojas <github@m.wojas.nl>
Thu, 26 Jan 2017 06:38:53 +0000 (14:38 +0800)
committerKonrad Wojas <github@m.wojas.nl>
Thu, 26 Jan 2017 06:38:53 +0000 (14:38 +0800)
commitce846be61e4487f77e87463bf162c1bebb7c32eb
tree808f4989cc5eb62bb71c8d27be126b378f97a60f
parent993589adde0123ad1b02a3cdd955efc4f42f08b4
Fix API performance: one DNSSECKeeper per request

getZoneInfo() was instantiating a new DNSSECKeeper for every call. Since
DNSSECKeeper opens a new database connection, this resulted in severe
performance issues in /api/v1/servers/localhost/zones with many zones.

This is fixed by passing a DNSSECKeeper instance to getZoneInfo().
With 10,000 zones and the sqlite3 backend, this reduces the API call
execution time from ~2s to ~200ms (from ~7s to 700ms for first call).
pdns/ws-auth.cc