Author: stefan2
Date: Sun Apr 13 05:42:44 2014
New Revision: 1586923
URL: http://svn.apache.org/r1586923
Log:
Reduce server-side memory consumption during 'svn log'.
* subversion/libsvn_repos/log.c
(detect_changed): Since the incomming change hash already lives in
POOL, we don't need to duplicate any of that data.
New info needs to copied to POOL, though.
Modified:
subversion/trunk/subversion/libsvn_repos/log.c
Modified: subversion/trunk/subversion/libsvn_repos/log.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/log.c?rev=1586923&r1=1586922&r2=1586923&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/log.c (original)
+++ subversion/trunk/subversion/libsvn_repos/log.c Sun Apr 13 05:42:44 2014
@@ -454,8 +454,11 @@ detect_changed(apr_hash_t **changed,
we will follow the DAG from ROOT to PATH and that requires
actually reading the directories along the way. */
if (!change->copyfrom_known)
- SVN_ERR(svn_fs_copied_from(©from_rev, ©from_path,
- root, path, subpool));
+ {
+ SVN_ERR(svn_fs_copied_from(©from_rev, ©from_path,
+ root, path, subpool));
+ copyfrom_path = apr_pstrdup(pool, copyfrom_path);
+ }
if (copyfrom_path && SVN_IS_VALID_REVNUM(copyfrom_rev))
{
@@ -476,14 +479,13 @@ detect_changed(apr_hash_t **changed,
if (readable)
{
- item->copyfrom_path = apr_pstrdup(pool, copyfrom_path);
+ item->copyfrom_path = copyfrom_path;
item->copyfrom_rev = copyfrom_rev;
}
}
}
- apr_hash_set(*changed, apr_pstrmemdup(pool, path, path_len), path_len,
- item);
+ apr_hash_set(*changed, path, path_len, item);
}
svn_pool_destroy(subpool);