knowledge.lapasa.net

Greater Toronto Area Flash Platform Developer Blog

Reduce Flex compile times by a factor equal to # of CPU cores

TAGS: None

Clement Wong of http://stopcoding.wordpress.com was a speaker at yesterday’s Flex Camp Toronto. If you have been working with the Flash or Flex IDE’s for any significant time, you would walk away from his talk with a deeper appreciation for the tools that we use everyday. Clement’s intentions were never to show the small audience to become experts in compilers. He just wanted to show us the door to the Java-based Compiler API which to the average Flex Developer is overlooked. It was a very valuable and highly technical insight. Arguably, the best presentation of the day aimed at a 200-300 level audience.

Even more importantly, he’s promoting the latest addition to the Flex ecosystem called the HellFire Compiler Daemon. The compiler that is bundled with Flash/Flex builder does not scale beyond a single core. HFDC uses out of order processing to delegate compilation tasks to unused cores and memory. For all you >1 min compile time sufferers whose software is destined for legacy at some point in the SDLC, check it out at http://bytecode-workshop.com.

I started following Flex from an end-user developer perspective starting at Flex 2 Beta 2. Clement shared Allaire/Macromedia anecdotes about how the Flash Authoring tool’s compiler was rebuilt in Java and made faster than it’s predecessor. As a long time Flash Developer, I found it extremely interesting what was going on behind the scenes at the times before the Macromedia/Adobe marketing machines started spinning it’s message to developers like us. Even if compiler design is not your thing, learning about the history behind the compiler that we invoke everyday was entertaining. It was a rare opportunity to interact with a speaker who has been a part of the team that makes the tools we use everyday.

Having attended a number of Flash/Flex conferences in the past, Clement’s ranks as one of the better ones based on a criteria I just realized just now:

- A good presentation has familiar parts: There are concepts and ideas that I knew about a long time ago and they are being re-enforced now. If there is an excess of this part, the presentation is mostly a waste of time.

- A good presentation has unfamiliar parts: There are concepts and ideas that I had no clue about and now I am aware of them. I am far from mastery but at least I have access to resources to learn more about it. If there is an excess of this part, the presentation is mostly a waste of time as maybe the studying the resources is beyond my interest.

- A presentation has a return on investment of time spent: Acquisition of new skill sets or tools that will help me everyday. This is more important the first two. Having attended this presentation, HFCD may shave compile times, help me discover bugs earlier, and deploy software faster.

If you have a chance to see him speak, I highly recommend.

I hate this new Google background on the search page

TAGS: None

At first i was like cool. Then I notice my Mac Book pro start to lag with everything else loaded in memory. What pisses me off even more is that there is nowhere on the page that says “We want your feedback” so that I can say “Why do I need to be logged in into my Google Account to ‘Change background image’? Is this a trick to put a face on an anonymous user?”

Solution: Getting a Spark List’s itemrender instance

Tags:

Problem: A list is visually made up of as many itemrenderers as the height of that control allows. There are times where you want to do an action on a previously itemrenderer focus that is about to be closed or out of focus. The problem is that there needs to be a reference to that old itemrenderer instance when the user selects a new instance.

Solution: On click of the list, remember the previous list.selectedIndex. Then access the list component’s datagroup property. Then extract the itemRenderer

protected function list_clickHandler(event:MouseEvent):void
{
var dataGroup:DataGroup = list.dataGroup;
var itemRenderer:IItemRenderer = dataGroup.getElementAt(list.selectedIndex) as IItemRenderer;
}

Now you can invoke public methods or public properties on that itemrenderer instance

© 2009 knowledge.lapasa.net. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.