VideoDisplay loses 8 kilobytes, now 33% lighter
Apr. 8th, 2006 | 04:26 am
In a few hours of hacking, the Flex 2.0 video component has lost 8 KB or 33% of its weight in compiled SWF bytecode.
Here's the sample I'm using:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Label text="Hello, world" />
<mx:VideoDisplay url="http://www.anders.us/GimmeKiss.flv" />
</mx:Application>
The above MXML compiled to 142,004 bytes on my local build. The VideoDisplay component contributed 24,828 bytes (24 KB) to the size of the SWF.
Then I performed a scrub of the video-related code, weeding out lots of dead code and streamlining the APIs. After the scrub, the above MXML now compiles to 133,836 bytes. That's a 32.89% (8,168 bytes) cut-down in the component's size!
There've been some API changes as well (cue point-related stuff). It's still all lying on my laptop, yet to be checked-in.