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 2014/06/24 23:07:20 UTC
svn commit: r1605195 - /subversion/trunk/subversion/libsvn_repos/log.c
Author: stefan2
Date: Tue Jun 24 21:07:20 2014
New Revision: 1605195
URL: http://svn.apache.org/r1605195
Log:
Reduce the memory consumption of "svn log -v" by ~20%.
* subversion/libsvn_repos/log.c
(detect_changed): Don't construct a copy of the CHANGES hash if possible.
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=1605195&r1=1605194&r2=1605195&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/log.c (original)
+++ subversion/trunk/subversion/libsvn_repos/log.c Tue Jun 24 21:07:20 2014
@@ -193,9 +193,18 @@ detect_changed(apr_hash_t **changed,
svn_boolean_t found_readable = FALSE;
svn_boolean_t found_unreadable = FALSE;
- *changed = svn_hash__make(pool);
+ /* If we create the CHANGES hash ourselves, we can reuse it as the
+ * result hash as it contains the exact same keys - but with _all_
+ * values being replaced by structs of a different type. */
if (changes == NULL)
- SVN_ERR(svn_fs_paths_changed2(&changes, root, pool));
+ {
+ SVN_ERR(svn_fs_paths_changed2(&changes, root, pool));
+ *changed = changes;
+ }
+ else
+ {
+ *changed = svn_hash__make(pool);
+ }
if (apr_hash_count(changes) == 0)
/* No paths changed in this revision? Uh, sure, I guess the