On 20/06/2010 17:24, shunhao chen wrote:
> Hi all,
>          I have 2100 jsp files in my system, and I use the following ant 
> script to precompile my jsp files. It takes 10 minutes to complete. 10 
> minutes is too long for me, because I also need to run class obfuscation, 
> js/css compressor and test case. It’s any tips for me to speed up the 
> precompilation?

Your options include getting a faster computer.

The design of your JSPs could influence the amount of time it takes to
do the compilation.  If you're using lots of different taglibs for example.

AFAIK there's no settings you can tweak to make compilation go faster.


p


> ==============================================================================
> The following is my ant script:
>    <target name="common.compilejsp">
>       <taskdef classname="org.apache.jasper.JspC" name="jasper2">
>          <classpath id="jspc.classpath">
>             <pathelement location="${java.home}/../lib/tools.jar" />
>             <fileset dir="${tomcat.home}/bin">
>                <include name="*.jar" />
>             </fileset>
>             <fileset dir="${tomcat.home}/server/lib">
>                <include name="*.jar" />
>             </fileset>
>             <fileset dir="${tomcat.home}/common/lib">
>                <include name="*.jar" />
>             </fileset>
>          </classpath>
>       </taskdef>
>  
>       <delete failonerror="false" dir="${build.dir}/jspsrc"/>
>       <mkdir dir="${build.dir}/jspsrc"/>
>       <echo>${jsp.srcdir}</echo>
>       <jasper2 validateXml="false" uriroot="${jsp.srcdir}"
>          webXmlFragment="${basedir}/generated_web.xml"
>          outputDir="${build.dir}/jspsrc" >
>       </jasper2>        
>      
>       <javac destdir="${jsp.compilation.destdir}" optimize="off"
>          debug="off" failonerror="${failonerror.during.compilation}" 
> srcdir="${build.dir}/jspsrc"
>          encoding="UTF-8" fork="true" memoryMaximumSize="1280M">
>          <classpath>
>             <pathelement location="${8th.classes.dir}" />
>             <fileset dir="${8th.lib.dir}">
>                <include name="*.jar" />
>             </fileset>
>             <pathelement location="${tomcat.home}/common/classes" />
>             <fileset dir="${tomcat.home}/common/lib">
>                <include name="*.jar" />
>             </fileset>
>             <pathelement location="${tomcat.home}/shared/classes" />
>             <fileset dir="${tomcat.home}/shared/lib">
>                <include name="*.jar" />
>             </fileset>
>             <fileset dir="${tomcat.home}/bin">
>                <include name="*.jar" />
>             </fileset>
>          </classpath>
>          <include name="**/*.java" />
>       </javac>
>    </target>
>  
> Regards,
> Eric chen
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to