[Laszlo-checkins] r13158 - in openlaszlo/trunk/WEB-INF/lps: config server/src/org/openlaszlo/compiler
hqm@openlaszlo.org
hqm at openlaszlo.org
Wed Mar 4 10:14:22 PST 2009
Author: hqm
Date: 2009-03-04 10:14:19 -0800 (Wed, 04 Mar 2009)
New Revision: 13158
Modified:
openlaszlo/trunk/WEB-INF/lps/config/lps.properties
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
Log:
Change 20090304-hqm-l by hqm at badtzmaru.home on 2009-03-04 11:28:03 EST
in /Users/hqm/openlaszlo/trunk6
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: make script cache persistent by default when running lzc
New Features:
Bugs Fixed: LPP-7699
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ script cache is persisted by default when compiling via lzc (compiler/Main.java)
+ removed --keepscriptcache, as it is redundant with --flush-script-cache
+ option boolean arg supported for --flush-script-cache[=true|false]
+ default behavior can be set in lps.properties: compiler.scache.persist=true|false
+ the script cache is (still) unconditionally persisted when compiling via the LPS server
Tests:
compile an an app from command line , timing the execution of the compiler
time lzc demos/calendar/calendar.lzx
then compile again and see if time is significantly less, due to caching in script compiler
then repeat with --flush-script-cache, and see if time goes up to the first compile time
time lzc --flush-script-cache demos/calendar/calendar.lzx
Modified: openlaszlo/trunk/WEB-INF/lps/config/lps.properties
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/config/lps.properties 2009-03-04 18:01:22 UTC (rev 13157)
+++ openlaszlo/trunk/WEB-INF/lps/config/lps.properties 2009-03-04 18:14:19 UTC (rev 13158)
@@ -171,8 +171,9 @@
# Use the incremental compilation feature of swf9 compiler (experimental)
compiler.swf9.incremental=false
+# If true, the script cache persists across invocations of the command line compiler
+compiler.scache.persist=true
-
#===============================================================================
# i18n locale parameter
#i18n.locale=ja_JP
Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java 2009-03-04 18:01:22 UTC (rev 13157)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java 2009-03-04 18:14:19 UTC (rev 13158)
@@ -33,8 +33,8 @@
" Action to take on compilation errors. Defaults to warn.",
"--help",
" Prints this message.",
- "--flush-script-cache",
- " Doesn't flush script cache before compiling.",
+ "--flush-script-cache[=true|false]",
+ " Flush script cache before compiling, boolean value optional. System default can be set in lps.properties ",
"--script-cache-dir directory",
" Location of script cache directory (default <lps>/work/scache)",
"--media-cache-dir directory",
@@ -125,7 +125,7 @@
compiler.setProperty(CompilationEnvironment.RUNTIME_PROPERTY,
LPS.getProperty("compiler.runtime.default",
LPS.getRuntimeDefault()));
- boolean flushScriptCache = true;
+ boolean flushScriptCache = "false".equals(LPS.getProperty("compiler.scache.persist", "true"));
Boolean forceTransCode = null;
String outFileArg = null;
boolean saveScriptOption = false;
@@ -149,11 +149,11 @@
LPS.setHome(lhome);
} else if (arg == "--schema") {
compiler.SchemaLogger.setLevel(Level.ALL);
- } else if (arg == "--keepscriptcache") {
- flushScriptCache = false;
- System.err.println("--keepscriptcache is deprecated. This is now the default behavior.");
} else if (arg == "--flush-script-cache") {
flushScriptCache = true;
+ } else if (arg.startsWith("--flush-script-cache=")) {
+ String value = arg.substring("--flush-script-cache=".length());
+ flushScriptCache = "true".equals(value);
} else if (arg == "--copy-resources") {
compiler.setProperty(CompilationEnvironment.COPY_RESOURCES_LOCAL, "true");
} else if (arg == "-o" || arg == "--output") {
More information about the Laszlo-checkins
mailing list