Be careful with transparent AIR apps
At my company I developed an Adobe AIR application created in Flex for internal use. The application uses custom chrome because it has a specific designed interface. At the time we also decided to enable the transparency. To achieve this, you only need to change some settings in the AIR configuration file. This file is located in the root of your Flex project and ends with "-app.xml". The first setting turns off the default OS specific chrome and the second one make the application transparent.
<transparent>true</transparent>
This is all very cool, and it worked out great for me. Sure, the application used a bit more CPU then expected, but that's a known issue for AIR applications. But some of my colleagues complained that their CPU went through the roof (more than 50% while doing nothing) and the application became unstable. Wouter Martens (currently doing his internship) stumbled upon this blog post because he also had the CPU issue on his machine. It turns out that the problem is depended on hardware, and that explains why some people have issues and others don't. We tested the same application without the transparency and the CPU issue was gone.
Luckily it turns out that we don't really need the transparency, and that we can easily change the design without a lot of impact. Changing the transparent setting in the xml file to "false" did the trick.
<transparent>false</transparent>
This demonstrates that it's not that trivial to create a cross-platform run-time, that also behaves consistent over all platforms and all hardware.
September 5th, 2009 - 05:01
GREATTTTT!!! Thanks, thanks and tks!!! First at all, sorry by my english (im from argentina). I was warried about this very STRANGE cpu issue, and for more than one year was developing a very strong application and looking for a solution about this trouble. Tonight i founded your blog and had tried your trick: UALAAAA!!! It works fine!!! My cpu usage goed down from more than 50% to only 10%%%%%%%
Im going dance to celebrate!!!