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 2013/09/05 22:56:15 UTC
svn commit: r1520421 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c
Author: stefan2
Date: Thu Sep 5 20:56:15 2013
New Revision: 1520421
URL: http://svn.apache.org/r1520421
Log:
Minor speedup to node verification in FSFS (FSX will use a different
approach) by skipping full DAG node creation unless necessary.
* subversion/libsvn_fs_fs/tree.c
(verify_node): get info directly from the noderev when feasible
Modified:
subversion/trunk/subversion/libsvn_fs_fs/tree.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1520421&r1=1520420&r2=1520421&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Thu Sep 5 20:56:15 2013
@@ -4323,19 +4323,28 @@ verify_node(dag_node_t *node,
{
svn_fs_dirent_t *dirent = svn__apr_hash_index_val(hi);
dag_node_t *child;
- svn_revnum_t child_rev;
apr_int64_t child_mergeinfo;
svn_pool_clear(iterpool);
/* Compute CHILD_REV. */
- SVN_ERR(svn_fs_fs__dag_get_node(&child, fs, dirent->id, iterpool));
- SVN_ERR(svn_fs_fs__dag_get_revision(&child_rev, child, iterpool));
+ if (svn_fs_fs__id_rev(dirent->id) == rev)
+ {
+ SVN_ERR(svn_fs_fs__dag_get_node(&child, fs, dirent->id,
+ iterpool));
+ SVN_ERR(verify_node(child, rev, iterpool));
+ SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&child_mergeinfo,
+ child));
+ }
+ else
+ {
+ /* access mergeinfo counter with minimal overhead */
+ node_revision_t *noderev;
+ SVN_ERR(svn_fs_fs__get_node_revision(&noderev, fs, dirent->id,
+ iterpool));
+ child_mergeinfo = noderev->mergeinfo_count;
+ }
- if (child_rev == rev)
- SVN_ERR(verify_node(child, rev, iterpool));
-
- SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&child_mergeinfo, child));
children_mergeinfo += child_mergeinfo;
}