Patch against pdns-3.1 svn tag
I noticed that there were a very high number of mutex hits on the QType object when running with mutrace. This is because every time the class is instantiated it checks to see if the static data has been initialized (and does this using a mutex). The attached patch converts the initialization process into a static constructor which removes the need for any mutex.
Attachment '' (qtype-mutex-remove.patch) https://gist.github.com/5466795
Reported & patched by Mark Zealey
Mark, have you benchmarked this? It so turns out that a static initializer internally devolves into a .. mutex ;)
So this might not actually help.
ok, you did something else, sorry - but it might now be that someone uses a qtype from global scope before it is initialized. this 'should not happen' though ;-)