facebook

JSP Validation Performance

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #242493 Reply

    sandeepdath
    Member

    I am using Eclipse 3.1.1 with MyEclipse 4.0.3 GA.

    The performance of JSP validation is terrible. Is there anything that I can do to improve this?

    Sandeep

    #242525

    Riyad Kalla
    Member

    Sandeep,
    In general using the following command line arguments is what we suggest:

    -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M

    Also, if the problem you are concerned with is the speed of autocomplete popping up, be sure to trim down the size of your Java Build Path for your project. For example, if you have included a lot of runtime dependencies that are not necessary for compile-time resolution; like weblogic.jar or other huge JARs, these will *signifigantly* impact the performance of autocomplete, and removing them will help speed it up.

    #242560

    sandeepdath
    Member

    I already have those command line arguments set.

    The problem is the time it takes to validate each JSP once changes have been made, and I try to save the file. I have a project with hundreds of JSPs, and it is becoming prohibitively expensive in terms of time to do a Clean and Build.

    Is the validation program making a separate call to javac for each file?

    Sandeep

    #242563

    Riyad Kalla
    Member

    The problem is the time it takes to validate each JSP once changes have been made, and I try to save the file.

    Validation times for JSP pages should be between 1-3seconds each; this is fairly standard across IDEs that offer JSP validation.

    I have a project with hundreds of JSPs, and it is becoming prohibitively expensive in terms of time to do a Clean and Build.

    In a typical development loop you should need to be cleaning your project unless something is wrong with it. Eclipse does a good job of keeping resources in sync; is there a reason you are manually cleaning it so often?

    Is the validation program making a separate call to javac for each file?

    The expense is the Jasper2 compiler:
    JSP -> Jasper2 generates Servlet -> Javac call to compile servlet -> Report validation errors back to UI

    The Javac call is a fraction of that loop.

    #246533

    We are experiencing the same exact problem. We were forced to turn of JSP Validation in all our web projects because when you do a clean it adds approximately 16 seconds for each JSP; and when you have hundreds of JSPs this is very painful to wait. I have tried all the tricks mentioned throughout these forums and it sill takes about 16 seconds to build each JSP during a build. I have tried the following:
    1. Added the permsize and memory arguments mentioned above
    2. Completely removed eclipse and myEclipse and re-installed them both
    3. Completely removed my project and recreated it
    4. Tried the -clean command line option
    5. I even updated my BIOS (found this in another thread).
    And it still takes about 16 seconds to compile each JSP. If you turn off the JSP validation a build takes less then a minute compared to over 15 minutes. Any other suggestions? The JSP validator is really nice; but unfortunately we are forced to not use it if we wish to become productive at all. 🙁

    #246534

    Oops I forget to provide my Information (sorry):
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    *** Date: Fri Feb 10 09:07:56 PST 2006

    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_06

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 4.1.0 GA
    Build id: 20060122-4.1-GA

    *** Eclipse details:
    Eclipse SDK

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse Platform

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse RCP

    Version: 3.1.1
    Build id: I20050627-1435

    Eclipse Java Development Tools

    Version: 3.1.1
    Build id: I20050627-1435

    Eclipse Plug-in Development Environment

    Version: 3.1.1
    Build id: I20050627-1435

    Eclipse Project SDK

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    c:\eclipse\eclipse.exe
    -name
    Eclipse
    -exitdata
    704_7cc
    -refresh
    -nolazyregistrycacheloading
    -vm
    C:\Program Files\Java\jre1.5.0_06\bin\javaw.exe

    #246543

    Riyad Kalla
    Member

    What are the specs of the machine that the build taking 16 seconds is on?

    #246546

    Intel Pentium 4: 2.666 GHZ
    1.0 GB RAM
    Windows XP PRO SP2

    #246547

    Riyad Kalla
    Member

    And can you single out a particular JSP page, say index.jsp, and confirm that it takes 16 seconds to compile? Then tell me some specs of the page? How many lines? Does it use a lot of taglibs? How many? How many includes are in it?

    Also, please copy and paste your Eclipse startup arguments. Either from your command line or from your eclipse.ini file.

    And please paste the result of MyEclipse > About > Configuration Summary here for me (use the MyEclipse Conf Summary, not the Help> About one that is 20 pages long)

    #246656

    It looks like it happens on every jsp file (not for sure; i didn’t sit there and watch all 1300 files get compiled. 🙂 I turned back on validation and it appears to happen on small files (with only a few lines) and large files that have over 2000 lines of code. We use the struts tag libraries and we have two of our own custom tag libraries. The imports in the jsps range to a low of about 6 imports to some files having more then 30 imports.

    The weblogic.jspc compiler doesn’t take nearly as much time as this validation compiler; so for now we have to rely on this compiler to do our validation (quite unfortunate). 🙁

    I start up eclipse using the following command file:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    :INIT
    SETLOCAL
    pushd .\
    set ECLIPSE_DIR=c:\eclipse
    set ECLIPSE=%ECLIPSE_DIR%\eclipse.exe
    set JAVA_HOME=”C:\Program Files\Java\jre1.5.0_06″
    set VM=%JAVA_HOME%\bin\javaw.exe
    ::set VM=%JAVA_HOME%\bin\java.exe
    ::set ECLIPSE_ARGS=-refresh -nosplash -nolazyregistrycacheloading
    set ECLIPSE_ARGS=-nosplash

    set MEM_ARGS=-Xms128m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=128M
    set VM_ARGS=-Duser.language=en -Dide.gc=true -XX:+UseParallelGC
    :RUN
    cd %ECLIPSE_DIR%
    ::start %ECLIPSE% %ECLIPSE_ARGS% -vm %VM% -vmargs %MEM_ARGS% %VM_ARGS%
    start %ECLIPSE% %ECLIPSE_ARGS% -vm %VM% -vmargs %MEM_ARGS%

    :EXIT
    ENDLOCAL
    exit
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Any my configuration summary is:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    *** Date: Mon Feb 13 08:22:39 PST 2006

    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_06

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 4.1.0 GA
    Build id: 20060122-4.1-GA

    *** Eclipse details:
    Eclipse SDK

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse Platform

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse RCP

    Version: 3.1.1
    Build id: I20050627-1435

    Eclipse Java Development Tools

    Version: 3.1.1
    Build id: I20050627-1435

    Eclipse Plug-in Development Environment

    Version: 3.1.1
    Build id: I20050627-1435

    Eclipse Project SDK

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    c:\eclipse\eclipse.exe
    -name
    Eclipse
    -exitdata
    f5c_7cc
    -vm
    C:\Program Files\Java\jre1.5.0_06\bin\javaw.exe

    #246659

    Riyad Kalla
    Member

    Do me a favor just to humor me. Shut down MyEclipse, go run eclipse.exe directly (with all defeault settings, no special arguments) then open a JSP page, chang eit and save it, how long did it take to validate?

    #246663

    Saving the file I would see the message “Buiding workspace: (51%) for about 3 seconds. If I did a clean (where it validates all the files), it took about 4 seconds per file. That is much better! I tried all the tricks I could find on the forums, i can’t believe not trying nothing would have fixed the problem (go figure).

    Thank you!

    #246666

    Wait a minute, i just re-started eclipse with the arguments that I had before:
    start c:\eclipse\eclipse.exe -nosplash -vm “C:\Program Files\Java\jre1.5.0_06” -vmargs -Xms128m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=128M

    and it is still taking about 4 seconds per file. Not sure why all of a sudden it would be down from 16 seconds per file?

    #246671

    Riyad Kalla
    Member

    No idea… did you reboot somewhere in there? Maybe that did it.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: JSP Validation Performance

You must be logged in to post in the forum log in