Max Carlson | 1 Aug 03:02
Favicon

For Review: Change 20070731-maxcarlson-r Summary: More null protection, cache view values

Change 20070731-maxcarlson-r by maxcarlson <at> plastik on 2007-07-31  
17:41:50 PDT
     in /Users/maxcarlson/openlaszlo/wafflecone
     for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: More null protection, cache view values

New Features:

Bugs Fixed: LPP-4414 - Improve startup performance (partial)

Technical Reviewer: promanik
QA Reviewer: ben
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: LzText.lzs - Don't reset text to same value in setText().

LzViewLinkage.lzs - Check for null values.

LaszloView.lzs - Send onresourcewidth/height events for error/ 
timeout.  Cache x, y, width and height values and don't reset.

LaszloEvents.lzs - Check for null values.

LzDataElement.lzs - Check for null values.

(Continue reading)

Philip Romanik | 1 Aug 03:36
Favicon

Re: For Review: Change 20070731-maxcarlson-r Summary: More null protection, cache view values

Approved!

I tested with webtop, and ran smoketest in swf/dhtml.

>Change 20070731-maxcarlson-r by maxcarlson <at> plastik on 2007-07-31
>17:41:50 PDT
>      in /Users/maxcarlson/openlaszlo/wafflecone
>      for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
>
>Summary: More null protection, cache view values
>
>New Features:
>
>Bugs Fixed: LPP-4414 - Improve startup performance (partial)
>
>Technical Reviewer: promanik
>QA Reviewer: ben
>Doc Reviewer: (pending)
>
>Documentation:
>
>Release Notes:
>
>Details: LzText.lzs - Don't reset text to same value in setText().
>
>LzViewLinkage.lzs - Check for null values.
>
>LaszloView.lzs - Send onresourcewidth/height events for error/
>timeout.  Cache x, y, width and height values and don't reset.
>
(Continue reading)

Benjamin Shine | 1 Aug 06:17
Favicon

For Review: Change 20070731-ben-h Summary: Improvements to performance tests for functions in wafflecone

Change 20070731-ben-h by ben <at> cooper.local on 2007-07-31 21:10:15 PDT
     in /Users/ben/src/svn/openlaszlo/branches/wafflecone/test/lfc/perf
     for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone/ 
test/lfc/perf

Summary: Improvements to performance tests for functions in wafflecone

New Features: scaledfunctions.lzx tests lots and lots of iterations  
of functions

Bugs Fixed:

Technical Reviewer: max (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:
This is an early quick test setup to compare various kinds of  
function calls.
The numbers are not stored anywhere or reported anywhere, because the
comparisons are only interesting between numbers in the very same run.

Release Notes:

Details:

Tests:
http://localhost:8080/wafflecone/test/lfc/perf/scaledfunctions.lzx
http://localhost:8080/wafflecone/test/lfc/perf/scaledfunctions.lzx? 
lzr=dhtml
(Continue reading)

J Crowley | 1 Aug 10:51
Favicon

For Review: Change 20070801-jcrowley-1 Summary: add Method removeAllItems at Component baselist

Change 20070801-jcrowley-1 by jcrowley <at> doctormanhattan.mshome.net on  
2007-08-01 04:43:23 EDT
     in /Users/jcrowley/src/svn/openlaszlo/legals-safe
     for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: add Method removeAllItems at Component baselist

New Features:

Bugs Fixed: LPP-4054

Technical Reviewer: promanik
QA Reviewer: henry
Doc Reviewer:

Documentation:

Release Notes:

Details: Bug fix from community contributor Sebastian Wagner.

No rush on this, by the way; I can wait until after we're
done with WaffleCone.

Tests: I used this testcase:

<canvas width="600" height="400">
     <list name="testlist" x="10" y="10">
         <textlistitem text="item 1" value="1" selected="true"/>
         <textlistitem text="item 2" value="2"/>
(Continue reading)

P T Withington | 1 Aug 13:25
Favicon

Re: [Laszlo-checkins] r5891 - openlaszlo/branches/legals/lps/components/base

If you edit a file after you create your change request, it will not  
automatically be included.  You have to run

svn-updatechange

to pick up new files.

On 2007-08-01, at 04:07 EDT, jcrowley <at> openlaszlo.org wrote:

> Author: jcrowley
> Date: 2007-08-01 01:07:55 -0700 (Wed, 01 Aug 2007)
> New Revision: 5891
>
> Modified:
>    openlaszlo/branches/legals/lps/components/base/baseformitem.lzx
> Log:
> This should've been checked in a long time ago along with  
> baseform.lzx, but something went wrong.  This was approved in  
> January by Tucker, but somehow this file didn't get included in the  
> commit.  Fixing that now.
>
>
> Modified: openlaszlo/branches/legals/lps/components/base/ 
> baseformitem.lzx
> ===================================================================
> --- openlaszlo/branches/legals/lps/components/base/baseformitem.lzx	 
> 2007-08-01 06:43:22 UTC (rev 5890)
> +++ openlaszlo/branches/legals/lps/components/base/baseformitem.lzx	 
> 2007-08-01 08:07:55 UTC (rev 5891)
> @@ -53,6 +53,12 @@
(Continue reading)

P T Withington | 1 Aug 14:02
Favicon

Javascript optimization hints [Was: [Laszlo-checkins] r5888 - in openlaszlo/branches/wafflecone: WEB-INF/lps/lfc/data WEB-INF/lps/lfc/events WEB-INF/lps/lfc/views lps/components/base]

Since the compiler does not do common-subexpression elimination, when  
you are trying to optimize things, pretend you are writing in 1985  
C.  Instead of:

   if (d.c[d.f]) d.c[d.f]( sd )

say:

   var f = d.c[d.f];
   if (f) f(sd);

Even better, when you find yourself having to write a null check, ask  
yourself if it would be cleaner, simpler, and more efficient to have  
the variable you are referencing not be nullable.  For instance, if a  
variable is an array, consider using an empty array for its initial  
value, rather than null.  This is a time/space trade-off:  if there  
are many operations on the array and the variable is almost always  
not null, it will be more efficient to use an empty array; if there  
are few operations and the variable is usually null, then not  
allocating the empty array is the better choice.

(In Javascript 2, you will have the option of declaring a variable to  
be of a particular type, and you will have the option of declaring  
wether or not that variable can also be null.  If you declare it not  
to be nullable, then the compiler will give you a compile-time  
warning if it cannot prove that the variable is never null, and it  
will insert the appropriate runtime check for you.

   // This can be null, you have to check before using
   var uplinkArray: Array;
(Continue reading)

Henry Minsky | 1 Aug 17:02
Picon

Re: For Review: Change 20070731-ben-h Summary: Improvements to performance tests for functions in wafflecone

Can you check this in, I'd like to start using it.

On 8/1/07, Benjamin Shine <ben <at> laszlosystems.com> wrote:
> Change 20070731-ben-h by ben <at> cooper.local on 2007-07-31 21:10:15 PDT
>      in /Users/ben/src/svn/openlaszlo/branches/wafflecone/test/lfc/perf
>      for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone/
> test/lfc/perf
>
> Summary: Improvements to performance tests for functions in wafflecone
>
> New Features: scaledfunctions.lzx tests lots and lots of iterations
> of functions
>
> Bugs Fixed:
>
> Technical Reviewer: max (pending)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
>
> Documentation:
> This is an early quick test setup to compare various kinds of
> function calls.
> The numbers are not stored anywhere or reported anywhere, because the
> comparisons are only interesting between numbers in the very same run.
>
> Release Notes:
>
> Details:
>
>
(Continue reading)

Max Carlson | 1 Aug 17:47
Favicon

Re: Javascript optimization hints [Was: [Laszlo-checkins] r5888 - in openlaszlo/branches/wafflecone: WEB-INF/lps/lfc/data WEB-INF/lps/lfc/events WEB-INF/lps/lfc/views lps/components/base]

Thanks for the tips - it's always good to have a reminder :).

Just so I'm clear, we can now use JS2 type declarations:

var uplinkArray: Array;

but they'll be ignored (for now).  Is this correct?

If so, it'll be a good task for someone to go through the LFC and add 
type annotations sooner rather than later!

P T Withington wrote:
> Since the compiler does not do common-subexpression elimination, when 
> you are trying to optimize things, pretend you are writing in 1985 C.  
> Instead of:
> 
>   if (d.c[d.f]) d.c[d.f]( sd )
> 
> say:
> 
>   var f = d.c[d.f];
>   if (f) f(sd);
> 
> Even better, when you find yourself having to write a null check, ask 
> yourself if it would be cleaner, simpler, and more efficient to have the 
> variable you are referencing not be nullable.  For instance, if a 
> variable is an array, consider using an empty array for its initial 
> value, rather than null.  This is a time/space trade-off:  if there are 
> many operations on the array and the variable is almost always not null, 
> it will be more efficient to use an empty array; if there are few 
(Continue reading)

Max Carlson | 1 Aug 17:50
Favicon

Re: For Review: Change 20070731-ben-h Summary: Improvements to performance tests for functions in wafflecone

Approved.  We might want to be able to log the results, just so we can 
compare different runtimes and have something written down to refer to.

At some point, I really want reporting for unit and perf tests so we can 
go to a single source!

Benjamin Shine wrote:
> Change 20070731-ben-h by ben <at> cooper.local on 2007-07-31 21:10:15 PDT
>     in /Users/ben/src/svn/openlaszlo/branches/wafflecone/test/lfc/perf
>     for 
> http://svn.openlaszlo.org/openlaszlo/branches/wafflecone/test/lfc/perf
> 
> Summary: Improvements to performance tests for functions in wafflecone
> 
> New Features: scaledfunctions.lzx tests lots and lots of iterations of 
> functions
> 
> Bugs Fixed:
> 
> Technical Reviewer: max (pending)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
> 
> Documentation:
> This is an early quick test setup to compare various kinds of function 
> calls.
> The numbers are not stored anywhere or reported anywhere, because the
> comparisons are only interesting between numbers in the very same run.
> 
> Release Notes:
(Continue reading)

Benjamin Shine | 1 Aug 18:46
Favicon

Re: For Review: Change 20070731-ben-h Summary: Improvements to performance tests for functions in wafflecone

Music to my ears; it's in now.

On Aug 1, 2007, at 8:02 AM, Henry Minsky wrote:

> Can you check this in, I'd like to start using it.
>
>
> On 8/1/07, Benjamin Shine <ben <at> laszlosystems.com> wrote:
>> Change 20070731-ben-h by ben <at> cooper.local on 2007-07-31 21:10:15 PDT
>>      in /Users/ben/src/svn/openlaszlo/branches/wafflecone/test/lfc/ 
>> perf
>>      for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone/
>> test/lfc/perf
>>
>> Summary: Improvements to performance tests for functions in  
>> wafflecone
>>
>> New Features: scaledfunctions.lzx tests lots and lots of iterations
>> of functions
>>
>> Bugs Fixed:
>>
>> Technical Reviewer: max (pending)
>> QA Reviewer: (pending)
>> Doc Reviewer: (pending)
>>
>> Documentation:
>> This is an early quick test setup to compare various kinds of
>> function calls.
>> The numbers are not stored anywhere or reported anywhere, because the
(Continue reading)


Gmane