def add_rdataset(self, section, name, rdataset, **kw):

        self._set_section(section)
        before = self.output.tell()
        n = rdataset.to_wire(name, self.output, self.compress, self.origin,
                             **kw)
        after = self.output.tell()
        if after >= self.max_size:
            self._rollback(before)
            raise dns.exception.TooBig
        self.counts[section] += n
Always cache data as an in-memory array before pickling
dataset/ETHPy150Open catap/namebench/nb_third_party/dns/renderer.py/Renderer.add_rdataset--crossover with--dataset/ETHPy150Open pydata/xarray/xarray/core/variable.py/Variable.__getstate__