[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 04 Feb 2013 13:02:45 +0000

stefan2_at_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
Received on 2013-02-04 14:03:39 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.