zippy / ceptr

(a recomposable medium for distributed social computing) || (semantic self-describing protocol stacks)
http://ceptr.org
GNU General Public License v3.0
88 stars 17 forks source link

improve mtree serialization of orthogonal trees #58

Open zippy opened 8 years ago

zippy commented 8 years ago

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.