DNS Generation is very slow even with changes to the caching layer.
I have spent some time porting the collect family of functions from generate_dns_snippets.py to the internal API of Netbox, and discovered that with few optimizations the entire step takes something around 30s targeting these APIs including serialization (as opposed to several minutes using the external API). I propose to take this work and create a CustomScript which would produce a JSON output matching what collect normally creates and replace the external API calls with a call to this script. There are numerous places in collect that could be further sped up to decrease the amount of data transferred and the amount of marshalling and unmarshalling that has to happen.