Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 572D4E608 for ; Mon, 26 Nov 2012 21:26:15 +0000 (UTC) Received: (qmail 23843 invoked by uid 500); 26 Nov 2012 21:26:15 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 23743 invoked by uid 500); 26 Nov 2012 21:26:15 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 23736 invoked by uid 99); 26 Nov 2012 21:26:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 21:26:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 21:26:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1FD29238897F; Mon, 26 Nov 2012 21:25:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1413868 - /subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c Date: Mon, 26 Nov 2012 21:25:53 -0000 To: commits@subversion.apache.org From: cmpilato@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121126212554.1FD29238897F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 "" and "" 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)); } }