[Laszlo-dev] [UPDATED] For Review: Change 20070827-maxcarlson-0 Summary: Inline setAttribute

P T Withington ptw at openlaszlo.org
Tue Aug 28 13:09:20 PDT 2007


So, you no longer want to restrict this optimization to the LFC?

I'm a little leery of the change to use a counter for the UUIDs.   
That seems risky.

The alternative is to wait for Don's work to refactor the compiler so  
this transformation comes before the analyzer phase that rewrites all  
locals compactly.

Bottom line:  Check this in if you believe the performance  
improvement is worth it.

On 2007-08-27, at 19:42 EDT, Max Carlson wrote:

> Change 20070827-maxcarlson-0 by maxcarlson at plastik on 2007-08-27  
> 16:33:13 PDT
>     in /Users/maxcarlson/openlaszlo/wafflecone
>     for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
>
> Summary: Inline setAttribute
>
> Bugs Fixed:
> LPP-4513 'Compiler Improvements to address performance'
>
> Technical Reviewer: ptw, max
> QA Reviewer: henry
> Doc Reviewer: (pending)
>
> Details:
>     CodeGenerator.java, JavascriptGenerator.java - Inline calls to
>     setAttribute() when called as the script compiler, unless #pragma
>     "passThrough=true".  UUID generator uses integer counter to cut  
> down on
>     size.
>
>     LzContextMenu.js, LzTextSprite.js, LzInputTextSprite.js,
>     embednew.js, iframemanager.js - Call Lz.__setAttr() instead of
>     div.setAttribute(...).  Add __setAttr() method to be used so
>     div.setAttribute() isn't inlined.
>
> Tests:
>     All demos run as before (but faster in swf and dhtml).  smokecheck
>     also runs and passes now.
>     http://localhost:8080/wafflecone/my-apps/copy-of-hello.lzx is 62k
>     compressed in dhtml (was 60k), 92k compressed in swf7 (was 89k)  
> and
>     93k compressed in swf8 (was 90k).  This change will benefit  
> animators
>     and alignment constraints now.  We can always manually inline/ 
> optimize to
>     bring the size down later.  I recommend taking this for now.
>
> Files:
> M      WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js
> M      WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
> M      WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
> M      WEB-INF/lps/server/src/org/openlaszlo/sc/ 
> JavascriptGenerator.java
> M      WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
> M      lps/includes/source/embednew.js
> M      lps/includes/source/iframemanager.js
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070827- 
> maxcarlson-0.tar



More information about the Laszlo-dev mailing list