stef...@apache.org writes: > Author: stefan2 > Date: Mon Feb 4 10:38:45 2013 > New Revision: 1442071 > > URL: http://svn.apache.org/viewvc?rev=1442071&view=rev > Log: > Speed up serialization of DAG and noderev structures for our caches. > Turns out that 503 bytes is often not sufficient for noderevs with > longer path names and even less so for DAG nodes. Up that to 1007 > bytes (+1 0-terminator +16 bytes memory management overhead = 1kB).
These comments about the size would be better in the code. Perhaps this number should be a named constant? > --- subversion/trunk/subversion/libsvn_fs_fs/dag.c (original) > +++ subversion/trunk/subversion/libsvn_fs_fs/dag.c Mon Feb 4 10:38:45 2013 > @@ -1095,7 +1095,7 @@ svn_fs_fs__dag_serialize(void **data, > svn_temp_serializer__context_t *context = > svn_temp_serializer__init(node, > sizeof(*node), > - 503, > + 1007, > pool); > > /* for mutable nodes, we will _never_ cache the noderev */ > --- subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c (original) > +++ subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c Mon Feb 4 > 10:38:45 2013 > @@ -741,7 +741,7 @@ svn_fs_fs__serialize_node_revision(void > > /* create an (empty) serialization context with plenty of buffer space */ > svn_temp_serializer__context_t *context = > - svn_temp_serializer__init(NULL, 0, 503, pool); > + svn_temp_serializer__init(NULL, 0, 1007, pool); > > /* serialize the noderev */ > svn_fs_fs__noderev_serialize(context, &noderev); > > -- Certified & Supported Apache Subversion Downloads: http://www.wandisco.com/subversion/download