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 2012/05/21 02:16:45 UTC
svn commit: r1340875 - /subversion/trunk/subversion/libsvn_fs_fs/dag.c
Author: stefan2
Date: Mon May 21 00:16:45 2012
New Revision: 1340875
URL: http://svn.apache.org/viewvc?rev=1340875&view=rev
Log:
Fix another O(n^2) commit performance issue:
Replace O(n^2) dirent lookup code with O(n log n) lookup.
* subversion/libsvn_fs_fs/dag.c
(svn_fs_fs__dag_delete): use direct access to dirent
Modified:
subversion/trunk/subversion/libsvn_fs_fs/dag.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?rev=1340875&r1=1340874&r2=1340875&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/dag.c Mon May 21 00:16:45 2012
@@ -778,11 +778,9 @@ svn_fs_fs__dag_delete(dag_node_t *parent
subpool = svn_pool_create(pool);
- /* Get a dirent hash for this directory. */
- SVN_ERR(svn_fs_fs__rep_contents_dir(&entries, fs, parent_noderev, subpool));
-
- /* Find name in the ENTRIES hash. */
- dirent = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+ /* Search this directory for a dirent with that NAME. */
+ SVN_ERR(svn_fs_fs__rep_contents_dir_entry(&dirent, fs, parent_noderev,
+ name, subpool, subpool));
/* If we never found ID in ENTRIES (perhaps because there are no
ENTRIES, perhaps because ID just isn't in the existing ENTRIES