On 8/21/10 12:24 PM, P T Withington wrote:
Not approved:

1) I don't understand the point of this (which you have done in any number of 
places):

(expr&&  (expr is LzAttributeDescriptor)
>
that would just seem to add a redundant test.  if `expr` is null, it is not 
going to be an LzAttributeDescriptor, so why add another conditional?

I did this because the inlined is operator (in DHTML at least) is inefficient:

It was expanding to:
if(LzAttributeDescriptor["$lzsc$isa"]?LzAttributeDescriptor.$lzsc$isa($8):$8 instanceof LzAttributeDescriptor){

Testing for null saves some work:
if($8&&(LzAttributeDescriptor["$lzsc$isa"]?LzAttributeDescriptor.$lzsc$isa($8):$8 instanceof LzAttributeDescriptor)){

I guess I'll change the compiler's inlining instead of hacking the source.

2) This can't work in as3, can it?  I really don't like cheating like this...

+          // play a little fast and loose - if we have a .ready slot, assume 
we're an event.
+          if (thisevent) {
+            if (thisevent.ready) { thisevent.sendEvent( args[ key ] ); }

It seems to be fine, at least with all the sample apps. I don't like cheating either, but it does shave off a tiny bit of time...

Otherwise it looks ok.

On 2010-08-21, at 14:08, Max Carlson wrote:

Heh - the change description was missing the Files: heading - doe!

Change maxcarlson-20100820-MGC by maxcarl...@friendly on 2010-08-20 20:07:19 PDT
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Add more typing, slight speedup for initArgs.

Bugs Fixed: LPP-6892 -  Generated File Sizes baseline complete; Performance 
Tuning ongoing

Technical Reviewer: ptw
QA Reviewer: hminsky

Details: LzNode - Check to see if the expr is null before using is on it.  Use 
quicker event registration.  Add typing.

LzEventable - Add typing.

LaszloEvents - Use slightly simpler test order.

LzState - Add typing, correct call signature.

LzReplicationManager - Add typing.

Tests: All apps run as before, show slightly fewer calls in firebug

Files:
M       WEB-INF/lps/lfc/core/LzNode.lzs
M       WEB-INF/lps/lfc/core/LzEventable.lzs
M       WEB-INF/lps/lfc/helpers/LzState.lzs
M       WEB-INF/lps/lfc/events/LaszloEvents.lzs
M       WEB-INF/lps/lfc/data/LzReplicationManager.lzs

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/maxcarlson-20100820-MGC.tar

Reply via email to