In serializing orthogonal trees we do a crazy thing of reallocating the serialize buffer when we hit an orthogonal tree because the initial overall size calculation doesn't know how big the orth tree will be.
It would be more efficient to cache serialized orthogonal trees as we do the first pass, and thus not have to realloc. This would also removing having to reset the pointers which is really ugly anyways.
In serializing orthogonal trees we do a crazy thing of reallocating the serialize buffer when we hit an orthogonal tree because the initial overall size calculation doesn't know how big the orth tree will be.
It would be more efficient to cache serialized orthogonal trees as we do the first pass, and thus not have to realloc. This would also removing having to reset the pointers which is really ugly anyways.