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 2015/03/25 18:33:43 UTC

svn commit: r1669176 - /subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c

Author: stefan2
Date: Wed Mar 25 17:33:43 2015
New Revision: 1669176

URL: http://svn.apache.org/r1669176
Log:
On the 1.10-cache-improvemnts branch: 

* subversion/libsvn_subr/cache-membuffer.c
  (svn_cache__membuffer_cache_create): Speed up the initial allocation of
        large membuffer caches in systems with over-commit, i.e. that only
        allocate and assign memory pages only upon first access.

Modified:
    subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c?rev=1669176&r1=1669175&r2=1669176&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/libsvn_subr/cache-membuffer.c Wed Mar 25 17:33:43 2015
@@ -1746,8 +1746,11 @@ svn_cache__membuffer_cache_create(svn_me
       c[seg].first_spare_group = NO_INDEX;
       c[seg].max_spare_used = 0;
 
-      c[seg].directory = apr_pcalloc(pool,
-                                     group_count * sizeof(entry_group_t));
+      /* Allocate but don't clear / zero the directory because it would add
+         significantly to the server start-up time if the caches are large.
+         Group initialization will take care of that in stead. */
+      c[seg].directory = apr_palloc(pool,
+                                    group_count * sizeof(entry_group_t));
 
       /* Allocate and initialize directory entries as "not initialized",
          hence "unused" */