Slow vraptor application after upgrading java and Tomcat

Asked

Viewed 30 times

0

I am working on a legacy application and the application to the natural is already a little slow, I believe that by the way it was developed, but after updating the version of java 7 to java 8 and Tomcat 7 to Tomcat 8 the application takes almost 2 minutes to load the home screen, before it would take at most 10 seconds.

  • vraptor 3.4.1
  • Tomcat 8.0.47
  • jdk 8

I believe that the slowness is occurring by the extremely slow delivery of content to the browser, because all requests are taking too long to complete, some examples:

  • bootstrap.min.css 19.6k: 10.07 seconds to download
  • font-awsome.min.css 5.7k: 20.27 seconds to download

These times were taken from the browser with the application running localhost.

I could provide several examples, but they all follow a defined pattern: the first 6 files (maximum number of parallel browser requests) take all at least 10 seconds, the next 6 take at least 20 seconds and so on.

I know I’m providing very little information but I really don’t know why I’m slow or where to start.

Could someone please help me?

1 answer

2


Apparently the problem was a filter in web.xml:

<filter>
    <filter-name>compressionFilter</filter-name>
    <filter-class>com.googlecode.webutilities.filters.CompressionFilter</filter-class>
    <init-param> 
        <param-name>compressionThreshold</param-name>
        <param-value>1024</param-value> <!-- compress anything above 1kb -->
    </init-param>
    <init-param> 
        <param-name>ignoreURLPattern</param-name>
        <param-value>.*\.(flv|mp3|mpg)</param-value> <!-- regex -->
    </init-param>
    <init-param> 
        <param-name>ignoreMimes</param-name>
        <param-value>images/*,video/*, multipart/x-gzip</param-value> <!-- ignore -->
    </init-param>
    <init-param> 
        <param-name>ignoreUserAgentsPattern</param-name>
        <param-value>.*MSIE.*</param-value> <!-- regex -->
    </init-param>
 </filter>
 <filter-mapping>
    <filter-name>compressionFilter</filter-name>
    <url-pattern>*</url-pattern>
 </filter-mapping>

I removed all this filter and everything went back to normal.

About vrapto4 I tried to update, but as the project has MANY classes that are customized and with older libs (has many libs of 2005, 2006 and 2007) it has become complicated to go after all solutions to solve all the depreciated methods, removed and stopped working from the libs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.