Application with slow vraptor after updating java and tomcat

0

I'm working on a legacy application and the application to the natural is already a little slow, I believe the way it was developed, but after upgrading the version of java 7 to java 8 and tomcat 7 to tomcat 8 the application takes almost 2 minutes to load the initial screen, before it took a maximum of 10 seconds.

  • vraptor 3.4.1
  • tomcat 8.0.47
  • jdk 8

I believe that slowdown is occurring because of the extremely slow delivery of content to the browser, as all requests are taking a long time to complete, for example:

  • 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 all follow a defined pattern: the first 6 files (maximum number of parallel browser requests) take all of them at least 10 seconds, the next 6 takes at least 20 seconds, and so on

I know I'm providing very little information but I really do not know what the reason for slowness is, or where to start.

Could someone please help me?

    
asked by anonymous 13.11.2017 / 15:52

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 it all worked again.

On vrapto4 I tried to update, but as the project has MANY classes that are custom and with older libs (it has lots of libs from 2005, 2006 and 2007) it was tricky to go after all the solutions to solve all the methods deprecated, removed and stopped working from libs.

    
20.11.2017 / 19:05