[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] make mod_dav_svn leak a little less

From: Robert Pluim <rpluim_at_bigfoot.com>
Date: 2003-02-27 18:04:20 CET

Besides being pretty slow, checkout over dav makes my httpd grow
enormously. The following patch ameliorates that somewhat (http grows
to ~10Meg rather than 120 for me now). It passes the testsuite.

Any suggestions on good places to look for performance improvements
over dav?

Robert

* svn/subversion/mod_dav_svn/repos.c (dav_svn_getetag): Use the
  subpool provided in the resource if it's valid. Makes checkout
  over dav use a lot less memory.

Index: repos.c
===================================================================
--- repos.c (revision 5088)
+++ repos.c (working copy)
@@ -1613,7 +1613,13 @@
 {
   svn_error_t *serr;
   svn_revnum_t created_rev;
+ apr_pool_t * p;
 
+ if (resource->info->pool)
+ p = resource->info->pool;
+ else
+ p = resource->pool;
+
   /* if the resource doesn't exist, isn't a simple REGULAR or VERSION
      resource, or it is a Baseline, then it has no etag. */
   /* ### we should assign etags to all resources at some point */
@@ -1627,15 +1633,15 @@
 
   if ((serr = svn_fs_node_created_rev(&created_rev, resource->info->root.root,
                                       resource->info->repos_path,
- resource->pool)))
+ p)))
     {
       /* ### what to do? */
       return "";
     }
   
- return apr_psprintf(resource->pool, "\"%" SVN_REVNUM_T_FMT "/%s\"",
+ return apr_psprintf(p, "\"%" SVN_REVNUM_T_FMT "/%s\"",
                       created_rev,
- apr_xml_quote_string(resource->pool,
+ apr_xml_quote_string(p,
                                            resource->info->repos_path, 1));
 }
 

-- 
Mobile: +33 6 19 49 54 48
Tel: +33 4 92 94 05 94

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 27 18:04:03 2003

This is an archived mail posted to the Subversion Dev mailing list.