6 Replies Latest reply on Apr 29, 2003 6:30 PM by jonlee

    Slow JSP Compilations

    pitdingo

      I am moving an application from JBoss 2.4.4/Tomcat 4.0.1 to JBoss 3.0.2 / Tomcat 4.1.18 and my JSPs compile WAY slow, as in an order of magnitude slower than before.

      We did no tweaks under the old combination. What am i missing?

      We are pulling our hair out waiting for pages to compile during development...

        • 1. Re: Slow JSP Compilations

          I think I'm running into the same problem. Compilation
          is very very slow with my configuration (JBoss 3.2 and catalina).

          • 2. Re: Slow JSP Compilations
            jonlee

            What are you running on? Are you observing any thrashing? If so, have you tried diagnosing memory usage and these kinds of issues?

            Haven't noticed any problems under Win2k with 384Mb of memory running the JDK 1.4.1_01 compiler. Works fine on Pentium II RedHat Linux with 192Mb running Jikes.

            Also after checking this, you may want to look at JSP compilation across the board from complex ones with EJB resource calls versus simple JSP with no connection to JBoss infrastructure.

            Just a few thoughts on some more rigorous testing to determine source of problem.

            • 3. Re: Slow JSP Compilations

              I have JSP without calls to underlying EJBs and JSp with calls. All are slow to compile. After the first call, there is no problem.

              By the way, another question : how I control precompiled JSP and how I tell Jboss/Tomcat to use them?

              Olivier.

              • 4. Re: Slow JSP Compilations
                pitdingo

                i am running on the same box as I was under JBoss 2.4.4. And it is the same code, same version of Java. I even tried using the JDK 1.4 and still was way slower to compile JSP's.

                I also tried the Jetty bundle and that was equally slow.

                Anyone know what has changed since then?

                • 5. Re: Slow JSP Compilations
                  pitdingo

                  i am running on the same box as I was under JBoss 2.4.4. And it is the same code, same version of Java. I even tried using the JDK 1.4 and still was way slower to compile JSP's.

                  I also tried the Jetty bundle and that was equally slow.

                  Anyone know what has changed since then?

                  • 6. Re: Slow JSP Compilations
                    jonlee

                    Olivier:

                    JBoss and Tomcat have moved on substantially since 2.4.4 and do make some additionally demands on resources. This is the reason I asked about thrashing - I assume you haven't noticed any additional disk activity that would indicate that processes are being swapped to disk or that sort of thing. Read my FAQ on changes to 3.2.0 with respect to observed memory usage.

                    For the purposes of determining the source of the problem, you could try a stand-alone version of Tomcat 4.1.24 to see whether JBoss is impeding things in anyway. The embedded Tomcat should really be no different in operation - JBoss just starts the Tomcat processes in the same VM as JBoss. Other than that, since Java is multi-threaded, it should be no different from a separated install. But I guess we just need to prove it is not JBoss interfering.

                    Jasper 2, the JSP compiler is used in both Jetty and Tomcat. You can check my FAQ on embedded Jetty for some information on Jasper configuration. For greater details, check the Jasper 2 Howto at the Apache Tomcat site. It explains in depth the settings and the performance control of Jasper.