[Laszlo-dev] [UPDATED] For Review: Change 20080606-ptw-1 Summary: Trim some fat
P T Withington
ptw at pobox.com
Wed Jun 18 13:24:30 PDT 2008
[UPDATED: Responding to André's review, weather demo works in swf9
(still), with no deprecated warnings in swf8]
Change 20080606-ptw-1 by ptw at dueling-banjos.local on 2008-06-06
06:47:15 EDT
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Trim some fat
Bugs Fixed:
LPP-6017 'file size of compiled swf applications has gotten
significantly larger' (partial)
Technical Reviewer: hminsky (pending)
QA Reviewer: a.bargull at intensis.de (pending)
Details:
With these changes, dhtml size is significantly improved, swf not
so much. In the table below, p-d is the pagan-deities sizes, r-d
is ring-ding, and now is with this change set
swf8 dhtml
p-d 121k 288k
r-d 226k 560k
now 208k 353k
LzNode: makeChild now takes the class to instantiate, instead of a
tag. This allows us to instantiate anonymous classes directly and
not clutter the tag table with anonymous class names. Renamed
userClassPlacement to follow internal class names, removed it from
the tag table. (Part of the reason this can work now is that the
compiler orders class definitions to emit them before they are
used, whereas in the past it did not handle forward references.)
swf9/hello.lzx: Update to load resource from local server rather
than Henry's house, so I can test off line.
LzLibraryLoader, LzLibrary, LzLibraryCleanup, kernel.as: Use class
instead of name for LzInstantiateView (and hence makeChild).
ReplicationManager: Use class rather than tag to create clones.
Class: Install class in global (rather than the compiler doing so
in-line, to save space).
CommonGenerator: Simplify argument defaulting code to use `switch`
and `Array#slice` rather than multiple `if` clauses and `for`
loop.
CanvasCompiler: Compute and declare all global id's and names in a
batch up front.
*: Rename '[cC]lass[nN]ame' to '[tT]ag[nN]ame', since that is
what it really
is. Update map generators and calls to instantiator to pass
'class' instead of 'name'.
NodeModel: If you are not in debug mode, use short, unique names
for methods, rather than the verbose names.
ClassModel: Allow classes that don't have corresponding tags.
Don't output empty children maps. Don't install anonymous classes
in the tagmap.
Tests:
smokecheck, ant runlztest, swf9/hello
Files:
M test/swf9/hello.lzx
M WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs
M WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js
M WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs
M WEB-INF/lps/lfc/debugger/platform/swf/kernel.as
M WEB-INF/lps/lfc/core/LzNode.lzs
M WEB-INF/lps/lfc/data/LzReplicationManager.lzs
M WEB-INF/lps/lfc/compiler/Class.lzs
M WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
CanvasCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
ViewSchema_Test.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
CompilationEnvironment.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/DataCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
ScriptElementCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
CompilationError.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilerUtils.java
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080606-ptw-1.tar
More information about the Laszlo-dev
mailing list