[Laszlo-dev] For Review: Change 20090304-hqm-l Summary: make script cache persistent by default when running lzc

Henry Minsky henry.minsky at gmail.com
Wed Mar 4 09:55:23 PST 2009


On Wed, Mar 4, 2009 at 12:33 PM, P T Withington <ptw at laszlosystems.com> wrote:
> Sorry to be such a pain but, should you use something like SafeArg that the
> rest of the arg processing does?  It seems your code will blow up if the
> user doesn't supply an "=".
>

I did something ugly, there are two different if clauses, one for
"--flush-script-cache", and
one for "--flush-script-cache=", so the first case will match if there
is no "=".


> Is there no getOpt library for Java?

Yeah, we really need something better than what we're using in
Main.java. There's a Java port of the gnu getopt library, but that
accepts a different syntax than we've been using for lzc.




>
> Should you add to the help message that the default value for script cache
> is in lps.properties?
>
> On 2009-03-04, at 11:40EST, Henry Minsky wrote:
>
>> 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
>>
>>
>> Files:
>> M      WEB-INF/lps/config/lps.properties
>> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
>>
>> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090304-hqm-l.tar
>
>



-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com



More information about the Laszlo-dev mailing list