Hey guys,
Sorry for the delay. I got a mild case of what felt like the flu last
week, but I'm back in action now.
While cleaning up the Loom codebase tonight in readiness for getting
the source published, I figured out a shortcut for the deduping
constant pool issue and optimized the deserializer accordingly. SWF
parsing speed is about 10x faster now, and the multiname issue with
SWF parsing is now fixed.
Messing around with some coarse optimizations, I found that bytecode
parsing speed improves by roughly 1/3 if Loom skips the parsing step
for opcodes in method bodies. Technically, we don't need the method
body opcodes in order to create proxies, since all the proxy method
bodies get generated anyway. What I expect we'll end up doing is
making a variety of flags for the deserializer and then we can set it
up to be as fast as possible for each use case.
Running the largest SWF I have access to through Loom (2.7 MB
compressed) resulted in two ABC frames. The first was 116,127 bytes
uncompressed and took 204 ms to parse, and the second was 2,865,247
bytes uncompressed and took 32,862 ms to parse. This puts parsing
speed at roughly 86 KB/sec, which is probably too slow for a preloader
on a production app of this size. That being said, I ran another SWF
app through that was 280 KB and it took around 2-3 seconds on average,
which is certainly viable for runtime SWF loading and enhancement.
So, for bigger apps, we'll probably need an AIR-based compile-time
weaver. Another option is to make a proxy weaver that works off of
describeType() info, which is certainly viable. Even though this
approach doesn't yield all the in-depth goodies you can get from
looking at the ABC bytecode directly, it will run faster at load time
and be perfectly adequate for proxy generation. So again, optimized
paths for different use cases will be appropriate.
Anyway, just wanted to post a status update. Watch this space for
more.
Thanks,
- max
> >
http://groups.google.com/group/loom-as3/browse_thread/thread/833cc9ee...
>
> > - max
>
> > On Jul 29, 2009, at 5:45 AM, craig w <
codecr...@gmail.com> wrote:
>
> >> Is there any code samples, unit tests, "tutorial" showing how it is
> >> expected to be used? that would help those that are interested in
> >> diving into the code.
>
> >> -craig
>
> >> On Tue, Jul 28, 2009 at 11:38 PM, Josh McDonald <
j...@joshmcdonald.info
> >> > wrote:
> >> Sounds fine Max :)
>
> >> 2009/7/29 maxim.porges <
maxim.por...@gmail.com>