This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 90fcf10974 Change default for archiveIndexStrategy to bloom to improve 
performance
90fcf10974 is described below

commit 90fcf10974e0899b42baedf0ac5c4d235252936f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 22 07:59:11 2025 +0100

    Change default for archiveIndexStrategy to bloom to improve performance
    
    This should improve class loading performance for the cost of a small
    amount of memory (less than 1kB per JAR file)
---
 java/org/apache/catalina/webresources/StandardRoot.java | 2 +-
 webapps/docs/changelog.xml                              | 6 ++++++
 webapps/docs/config/resources.xml                       | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/webresources/StandardRoot.java 
b/java/org/apache/catalina/webresources/StandardRoot.java
index 5fc8fbb045..1bacb8d3d3 100644
--- a/java/org/apache/catalina/webresources/StandardRoot.java
+++ b/java/org/apache/catalina/webresources/StandardRoot.java
@@ -81,7 +81,7 @@ public class StandardRoot extends LifecycleMBeanBase 
implements WebResourceRoot
     private boolean trackLockedFiles = false;
     private final Set<TrackedWebResource> trackedResources = 
ConcurrentHashMap.newKeySet();
 
-    private ArchiveIndexStrategy archiveIndexStrategy = 
ArchiveIndexStrategy.SIMPLE;
+    private ArchiveIndexStrategy archiveIndexStrategy = 
ArchiveIndexStrategy.BLOOM;
 
     // Constructs to make iteration over all WebResourceSets simpler
     private final List<WebResourceSet> mainResources = new ArrayList<>();
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7133de1da1..1ca1fb7c6a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -165,6 +165,12 @@
         of the request URI presented by the user agent that maps to the context
         path. (markt)
       </scode>
+      <update>
+        Change the default value of the <code>archiveIndexStrategy</code>
+        attribute of the <code>Resources</code> element from 
<code>simple</code>
+        to <code>bloom</code> to improve web application class loading
+        performance. (markt)
+      </update>
       <!-- Entries for backport and removal before 12.0.0-M1 below this line 
-->
     </changelog>
   </subsection>
diff --git a/webapps/docs/config/resources.xml 
b/webapps/docs/config/resources.xml
index 32027d8b48..de8eb1d9e8 100644
--- a/webapps/docs/config/resources.xml
+++ b/webapps/docs/config/resources.xml
@@ -86,7 +86,7 @@
         <p>If this is <code>purged</code> then a bloom filter will be used to
         speed up archive lookups, but can be purged at runtime. It is 
recommended
         to use <code>bloom</code> to avoid reinitializing the bloom 
filters.</p>
-        <p>If not specified, the default value of <code>simple</code> will be
+        <p>If not specified, the default value of <code>bloom</code> will be
         used.</p>
       </attribute>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to