You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/08/29 11:42:43 UTC

svn commit: r990533 - /subversion/branches/performance/subversion/libsvn_fs_fs/dag.c

Author: stefan2
Date: Sun Aug 29 09:42:42 2010
New Revision: 990533

URL: http://svn.apache.org/viewvc?rev=990533&view=rev
Log:
Since the data buffer passed to de-serialization callbacks is already a 
private copy in pool, we don't need to create another copy in the DAG
de-serialization code. For all other objects, this has already been done
in r986832.

* subversion/libsvn_fs_fs/dag.c
  (svn_fs_fs__dag_deserialize): directly fix up the content in DATA

Modified:
    subversion/branches/performance/subversion/libsvn_fs_fs/dag.c

Modified: subversion/branches/performance/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_fs_fs/dag.c?rev=990533&r1=990532&r2=990533&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/performance/subversion/libsvn_fs_fs/dag.c Sun Aug 29 09:42:42 2010
@@ -1121,14 +1121,12 @@ svn_fs_fs__dag_deserialize(void **out,
                            apr_size_t data_len,
                            apr_pool_t *pool)
 {
-  dag_node_t *node;
+  dag_node_t *node = (dag_node_t *)data;
   if (data_len == 0)
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                             _("Empty noderev in cache"));
 
   /* Copy the _full_ buffer as it also contains the sub-structures. */
-  node = apr_pcalloc(pool, data_len);
-  memcpy(node, data, data_len);
   node->fs = NULL;
 
   /* fixup all references to sub-structures */