Bug ID: 64527
           Summary: JarWarResourceSet gc caused class loading slowly
           Product: Tomcat 8
           Version: 8.5.39
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
  Target Milestone: ----

I have a spring boot application with embed tomcat, when i deploy my
application(a war package with 329 jar and 227Mb size) to servers, when i first
loading a class by Class.forName, it take several seconds.

I debug some tomcat source code, finally i noticed that when i load a class not
loaded before, it will always run into getArchiveEntries, it will check
archiveEntries is null and load from war file. And i also noticed in
JarWarResourceSet gc method will periodic execution set
archiveEntries=null.Caused class load slowly when archiveEntries=null, because
it will scan all of my war package resources to build a cache.

I'm override JarWarResourceSet let gc method do nothing, it fixed my problem.

But I don’t know if I’m right, so I’m asking here.

tomcat version: 8.5.39
spring boot version: 2.0.9.RELEASE

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to