You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2013/02/04 14:02:45 UTC

Re: svn commit: r1442071 - in /subversion/trunk/subversion/libsvn_fs_fs: dag.c temp_serializer.c

stefan2@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

Re: svn commit: r1442071 - in /subversion/trunk/subversion/libsvn_fs_fs: dag.c temp_serializer.c

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Mon, Feb 4, 2013 at 2:02 PM, Philip Martin <ph...@wandisco.com>wrote:

> stefan2@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?
>

Done in r1448587.

Thanks for the review!

-- Stefan^2,

-- 
Certified & Supported Apache Subversion Downloads:
*

http://www.wandisco.com/subversion/download
*