Oehm.... what about getting rid of the lzc exec call from the build file
in WEB-INF/lps/lfc and replace it with a direct call to the Class?
I changed it to
<target name="lzl" depends="chkUptoDate"
unless="${library}.notRequired" description="Build a .lzl library from
source">
<echo message="Compiling ${library}"/>
<echo message="arg: ${args} -o ${library}.lzl ${source}"/>
<java classpathref="lzcp" classname="org.openlaszlo.sc.Main">
<jvmarg value="-DLPS_HOME=${LPS_HOME}"/>
<arg line="${args} -o ${library}.lzl ${source}"/>
</java>
</target>
This avoids loading the jvm every time.
I didn't contribute the build.xml so far, because I hope that we switch
to ant-1.6.5 which will allow further improvements.
My full build.xml is attached (please be aware it's work in progress, so
it might not work out of the bix without minor fixing).
Cheers, Mika
Pablo Kang schrieb:
You're probably taking a hit with the JVM loading every time you run lzc.
pablo
On Fri, 18 Nov 2005, Scott Evans wrote:
I'm in the midst of moving our build process to use lzc and produce a
standalone .swf file every time -- instead of doing the in-place type of
recompiles that you get through the OLS.
But what I'm seeing so far is that rebuilds seem slower than they do
through a browser. *Something* is pegging the CPU for a while during
the
process, even if no files have changed. My source files get replaced on
the disk (we shuttle all our files off to a build location), but I keep
their timestamps, so as far as caching mechanisms go, the files should
look identical.
My lzc invocation is:
lzc --mcache on --keepscriptcache --runtime=swf7 main.lzx
Ideas?
gse
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY build_opt SYSTEM "file:../../../build-tools/build-opt.xml">
]>
<!-- build.xml -->
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<project name="lfc" default="build">
<description>
This is the build file for the LFC library.
</description>
&build_opt;
<path id="lzcp">
<pathelement location="${LPS_HOME}/WEB-INF/lps/server/build"/>
<pathelement location="${LPS_HOME}/WEB-INF/classes"/>
<fileset dir="${LPS_HOME}/3rd-party/jars/dev" includes="**/*.jar"/>
<fileset dir="${LPS_HOME}/WEB-INF/lib" includes="**/*.jar"/>
<fileset dir="${LPS_HOME}/WEB-INF/lib" includes="**/*.jar"/>
<!--fileset dir="${ant.home}/lib" includesfile="junit.jar"/-->
</path>
<!-- Define contrib tasks -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<target name="init" depends="build-opt">
<tstamp/>
<property file="${LPS_HOME}/build.properties"/>
<property name="sc.dir" value="${LPS_HOME}/WEB-INF/lps/server/sc"/>
</target>
<target name="clean" depends="init">
<delete failonerror="false">
<fileset dir="build" />
<fileset dir="." includes="*.lzl" />
</delete>
</target>
<target name="build" depends="init">
<!-- lzsc requires the server jar -->
<ant dir="${LPS_HOME}/WEB-INF/lps/server" target="build"/>
<condition property="lfc.required"><equals arg1="${build.lfc.runtime.swf5}" arg2="true"/></condition>
<antcall target="lfc" inheritall="true"><param name="version" value="5"/></antcall>
<antcall target="lfc_omitted" inheritall="true"><param name="version" value="5"/></antcall>
<condition property="lfc.required"><equals arg1="${build.lfc.runtime.swf6}" arg2="true"/></condition>
<antcall target="lfc" inheritall="true"><param name="version" value="6"/></antcall>
<antcall target="lfc_omitted" inheritall="true"><param name="version" value="6"/></antcall>
<condition property="lfc.required"><equals arg1="${build.lfc.runtime.swf7}" arg2="true"/></condition>
<antcall target="lfc" inheritall="true"><param name="version" value="7"/></antcall>
<antcall target="lfc_omitted" inheritall="true"><param name="version" value="7"/></antcall>
<condition property="lfc.required"><equals arg1="${build.lfc.runtime.swf8}" arg2="true"/></condition>
<antcall target="lfc" inheritall="true"><param name="version" value="8"/></antcall>
<antcall target="lfc_omitted" inheritall="true"><param name="version" value="8"/></antcall>
<!--
<if> <isset property="build.lfc.runtime.swf5" />
<then>
<ant target="lfc"> <property name="version" value="5" /> </ant>
</then>
<else>
<echo message="WARNING Skipping LFC5"/>
</else>
</if>
<if> <isset property="build.lfc.runtime.swf6" />
<then>
<ant target="lfc"> <property name="version" value="6" /> </ant>
</then>
<else>
<echo message="WARNING Skipping LFC6"/>
</else>
</if>
<if> <isset property="build.lfc.runtime.swf7" />
<then>
<ant target="lfc"> <property name="version" value="7" /> </ant>
</then>
<else>
<echo message="WARNING Skipping LFC7"/>
</else>
</if>
<if> <isset property="build.lfc.runtime.swf8" />
<then>
<ant target="lfc"> <property name="version" value="8" /> </ant>
</then>
<else>
<echo message="WARNING Skipping LFC8"/>
</else>
</if>
-->
<ant target="lzl" >
<property name="library" value="lzpreloader" />
<property name="args" value="--runtime=swf6"/>
<property name="source" value="lzpreloader.as" />
</ant>
</target>
<target name="lfc_omitted" if="${lfc.required}">
<echo message="WARNING Skipping LFC${version}"/>
</target>
<target name="lfc" description="Build lfc lzls" depends="init" unless="${lfc.required}">
<property name="runtime" value="swf${version}" />
<dependset>
<targetfileset dir="build/cache"/>
<srcfileset dir="${sc.dir}" includes="*.py"/>
</dependset>
<ant target="lzl" >
<property name="library" value="LFC${version}" />
<property name="args" value="--runtime=${runtime}" />
<property name="source" value="LaszloLibrary.as" />
<property name="excludes" value="lzpreloader.as" />
</ant>
<if> <isset property="build.lfc.runtime.debug" />
<then>
<ant target="lzl" >
<property name="library" value="LFC${version}-debug" />
<property name="args" value="--runtime=${runtime} --option nameFunctions '-D$debug=true'"/>
<property name="source" value="LaszloLibrary.as" />
<property name="excludes" value="lzpreloader.as" />
</ant>
</then>
<else>
<echo message="WARNING Skipping LFC${version}-debug"/>
</else>
</if>
<if> <isset property="build.lfc.runtime.profile" />
<then>
<ant target="lzl" >
<property name="library" value="LFC${version}-profile" />
<property name="args" value="--runtime=${runtime} -p"/>
<property name="source" value="LaszloLibrary.as" />
<property name="excludes" value="lzpreloader.as" />
</ant>
</then>
<else>
<echo message="WARNING Skipping LFC${version}-profile"/>
</else>
</if>
<if> <isset property="build.lfc.runtime.krank" />
<then>
<ant target="lzl" >
<property name="library" value="LFC${version}-krank" />
<property name="args" value="--runtime=${runtime} -k"/>
<property name="source" value="LaszloLibrary.as" />
<property name="excludes" value="lzpreloader.as" />
</ant>
</then>
<else>
<echo message="WARNING Skipping LFC${version}-krank"/>
</else>
</if>
<if> <isset property="build.lfc.runtime.krank" />
<then>
<if> <isset property="build.lfc.runtime.debug" />
<then>
<ant target="lzl" >
<property name="library" value="LFC${version}-krank-debug" />
<property name="args" value="--runtime=${runtime} -k --option nameFunctions '-D$debug=true'"/>
<property name="source" value="LaszloLibrary.as" />
<property name="excludes" value="lzpreloader.as" />
</ant>
</then>
<else>
<echo message="WARNING Skipping LFC${version}-krank-debug"/>
</else>
</if>
</then>
</if>
</target>
<target name="chkUptoDate">
<uptodate property="${library}.notRequired" targetfile="${library}.lzl">
<srcfiles dir="." includes="*.as,**/*.as" excludes="${excludes}" />
<srcfiles dir="${sc.dir}" includes="*.py"/>
<!-- Although lzsc requires the server jar, it only needs
the parser, which practically never changes, so don't
bother checking whether it's up to date - server/build
will have done that anyway. -->
</uptodate>
</target>
<!-- Expects the $library, $args, $source, and $excludes properties to be set from outside -->
<target name="lzl" depends="chkUptoDate" unless="${library}.notRequired" description="Build a .lzl library from source">
<echo message="Compiling ${library}"/>
<echo message="arg: ${args} -o ${library}.lzl ${source}"/>
<java classpathref="lzcp" classname="org.openlaszlo.sc.Main">
<jvmarg value="-DLPS_HOME=${LPS_HOME}"/>
<arg line="${args} -o ${library}.lzl ${source}"/>
</java>
</target>
<target name="doc">
<!-- TODO: [11/27/02 ows] Should this build the docs, and lps/build.xml
build this target instead of the one in docs? -->
</target>
<target name="all"
description="Clean, build, and doc"
depends="clean,build,doc"/>
</project>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user