Author: cmpilato
Date: Mon Nov 26 21:25:53 2012
New Revision: 1413868
URL: http://svn.apache.org/viewvc?rev=1413868&view=rev
Log:
On the 'issue-4194-dev' branch: fiddle some more with opportunistic
directory closure sites. With this snapshot, I can checkout ^/tags
from a pre-ASF mirror of our codebase served by a trunk mod_dav_svn
with a peak memory usage of ~50Mb.
* subversion/libsvn_ra_serf/update.c
(handle_propchange_only, handle_local_content): After doing the
primary work of these functions, call maybe_close_dir_chain().
(end_report): Call maybe_close_dir_chain() after processing the
"</add-directory>" and "</open-directory>" REPORT response elements.
(finish_report): Don't call maybe_close_dir_chain() while cleaning
up after file propfinds. This codepath is covered by the changes
to handle_propchange_only() and handle_local_content().
Modified:
subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c
Modified: subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c
URL:
http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c?rev=1413868&r1=1413867&r2=1413868&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c
(original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c Mon
Nov 26 21:25:53 2012
@@ -1399,6 +1399,10 @@ handle_propchange_only(report_info_t *in
info->dir->ref_count--;
+ /* See if the parent directory of this file (and perhaps even
+ parents of that) can be closed now. */
+ SVN_ERR(maybe_close_dir_chain(info->dir));
+
return SVN_NO_ERROR;
}
@@ -1423,6 +1427,10 @@ handle_local_content(report_info_t *info
info->dir->ref_count--;
+ /* See if the parent directory of this fetched item (and
+ perhaps even parents of that) can be closed now. */
+ SVN_ERR(maybe_close_dir_chain(info->dir));
+
return SVN_NO_ERROR;
}
@@ -2179,6 +2187,12 @@ end_report(svn_ra_serf__xml_parser_t *pa
info->dir->propfind_handler = NULL;
}
+ /* See if this directory (and perhaps even parents of that) can
+ be closed now. This is likely to be the case only if we
+ didn't need to contact the server for supplemental
+ information required to handle any of this directory's
+ children. */
+ SVN_ERR(maybe_close_dir_chain(info->dir));
svn_ra_serf__xml_pop_state(parser);
}
else if (state == OPEN_FILE && strcmp(name.name, "open-file") == 0)
@@ -2785,10 +2799,6 @@ finish_report(void *report_baton,
{
prev->next = cur->next;
}
-
- /* See if the parent directory of this fetched item (and
- perhaps even parents of that) can be closed now. */
- SVN_ERR(maybe_close_dir_chain(info->dir));
}
}