Why Adobe AIR is not Ready for Enterprise Deployment
This is what I noticed, after letting Twhirl run for about 24 hours straight:
Yes, you saw that correctly. 670 MB in just one day.
Unfortunately, Twhirl and it’s two main competitors, Alert Thingy and Feedalizr are all applications written on the slick Adobe AIR platform, and thus all suffer the same fate.
I wasn’t able to try out Alert Thingy (encountered an error when trying to install), but I did try Feedalizr, and the memory footprint bloated up to around 130 MB under Windows Vista within five minutes of usage. And I understand that generally speaking, high memory usage is a pretty common trait for Adobe AIR applications.
Remember, compared to some of the other applications that you may find on your desktop, these are pretty simple applications that have a pretty narrow set of capabilities.
As a comparison, I have been running my Lotus Notes 8 client on my laptop for about one week straight already. Now, Notes 8 catches a lot of grief for being bloated. Still, my Notes 8 memory footprint has never risen above 400 450 MB – no matter how long I keep it running or how much I use it every day. And Notes, as an enterprise application, has a much broader set of capabilities than your average Twitter client, and throughout its day-to-day use is expected to open a lot more network connections, perform a lot more disk I/O and database lookups and so forth.
Another two widely-accepted enterprise applications (and memory hogs), Internet Explorer 7 and Firefox, also rarely exceed the 300 MB memory footprint threshold (although one guy commenting on this Scoble entry claims that his IE is using 975 MB of memory).
Yes, I understand that Adobe AIR allows you to build cool-looking, rich Internet applications quickly using tools you are already familiar with. But until Adobe does something about its ghastly memory consumption, Adobe AIR will not be suitable for anything more than single purpose or hobbyist applications. Could we soon see the first full-featured email client with a 1 GB memory footprint written on Adobe AIR?
Just because Adobe AIR supports enterprise deployment, doesn’t mean it is ready for it… yet.
BTW, anyone know of any good Twitter and/or FriendFeed clients that are not written using Adobe AIR?

Wow, I don’t run Twhirl for long hours so I wasn’t aware that apps running on AA hogs memory. Thanks for the insightful post Jon.
Agreed with you, while the AA apps works and looks great ‘out-of-the-box”… unless Adobe looks hard into the issue, the adoption rate from comsumers will not be significant too.
Have you look into site-specific browsers that bring web services onto the desktop? Depending on the circumstances, I uses either Fluid (a site-specific browser for OS X) or Twhirl as my Twitter client. For Windows, you might wanna check out Bubbles http://bubbleshq.com/.
And uh, Mozilla Prism http://is.gd/1NC.
Thanks, Jonathan. Will check out Bubbles and Prism.
#1 Glad to see that you are using Process Explorer from SysInternals.
Mark Russinovich is now a Tech Fellow in Microsoft aka “Tech God” mode. He got a Phd btw…
#2 Notes 8 has a few processes running at any one time. Sum them up and you can go beyond 400MB. In fact Notes 8 is known to suck up to 867 Megs of RAM and more. Add more Eclipse/Notes plug-ins, it will grow fatter.
#3 MSIE’s RAM usage can increase due to the various plug-ins the users is using. As do FireFox, Safari and more…
#4 Adobe AIR has a long way to go compared to the richness and power of dotNet/Silverlight. The reason is simple, FLASH/Shockwave ran out of gas for Web 2.0 application needs. JAVA is also not there yet with JavaFX (which is also very late into the game).
$0.02
I love Sysinternals! I’ve been a loyal fan of Mark’s utilities even way before he sold ou… err, I mean “accepted a position” with Microsoft.
Last time I always felt like he knew how Windows NT worked much better that most of the NT development team did.
BTW, my Notes 8 memory footprint calculation includes both the nlnotes.exe and notes2w.exe processes. Now, I won’t say that I’m the most intensive Notes user you can find, but I do consider myself a power user and I run a fair number of plugins. Thus, I believe for the majority of enterprise users, 400 MB is a pretty liberal ceiling.
Anyway, my beef is not so much that the processes take up so much memory. I mean, what software *isn’t* bloated to some extent today? I can easily tolerate running one or even two 300 MB processes on my work machine (as can most enterprise users, I would imagine), but those two processes better be 90% of what I need to be productive at work (e.g. Notes + Firefox).
Having a single purpose application like Twhirl take up almost 700 MB is just inexcusable.
Ah !!! Then Jon you are but a Padawan… Notes 8 Masters uses the FULL blown Notes 8 Standard Client which runs eclipse.exe, nlnotes.exe, notes2w.exe and ntaskldr.exe… That will suck up all the life force on any machine.
You only use Notes 8 Basic Client which runs nlnotes.exe and notes2w.exe (which you also claim sucks up a max of 400MB)
There for a Notes 8 Master would probably suck up up to 1GB of RAM is extreme cases.
You are just halfway into the Dark Side of IT.
I’m actually using the full blown Notes 8 Standard Client with a handful of plugins – including a new Twitter client I found, surprisingly
. The eclipse.exe process also shouldn’t exist, since it is folded within the primary notes2w.exe process.
But I missed out the ntaskldr.exe process. My bad. So I’ll need to adjust my memory footprint calculations upwards to 450 MB instead of 400 MB.
If I was just running Notes 8 Basic Client, it would only be the nlnotes.exe process (no notes2w.exe). My nlnotes.exe has been hovering at around 100 MB or so for a while already, which if I’m not mistaken is about a third of what a typical Outlook 2007 client would consume if left running for one week.
Thank god for Moore’s Law!
RAM is only one point of view.. Have you compared the startup time ?
Can’t beat Outlook using Notes 8.
Anyway no one seem to mention Yahoo’s desperate attempt at some RCP via… BrowserPlus ! http://browserplus.yahoo.com/
Let the games begin ! AIR, Silverlight, Gears, BrowserPlus, Prism, etc…
I’m afraid a lot of poor Flash coders are giving flash/flex/air a very bad name.
The problem is with the new garbage collection system that Adobe have implemented in ActionScript 3. In the older versions, the memory was cleared with almost no work on the coder’s part. These days you have to manually unlink every reference before something becomes eligible for automatic collection, and the developer has no control over when these collection sweeps happen.
The upshot is that sloppy coders used to the old ways are not yet used to clearing up after themselves, meaning that NOTHING gets removed from the memory, as I’m sure was pretty much the case with your example.
With properly written code, any flash/flex/air app an easily be very lightweight and not increase in memory usage over time. But that kinda requires good developers!
Tom-
Tom, you are probably right.
And to the credit of Twhirl’s developers, shortly after I posted this blog entry, they released version 0.8.2 of Twhirl, which uses significantly less memory than before.
I still maintain that memeory usage is rather high for more or less a single-purpose application, but now my Twhirl memory footprint stabilizes at around 150 MB or so, even left running for a week.
I ain’t no ActionScript guru, but I would be curious why Adobe chose to change the GC behavior for ActionScript 3 as you described, making life harder for developers.
Coming from a Java/J2EE background, I have to say that I feel one of the reasons why Java really took off was because the language made it easy for developers to just focus on implementing the functionality, and not need to worry about memory management and all of the other heavy lifting and plumbing that is necessary behind the scenes. So even lesser developers have a decent chance in being productive and generating acceptable quality code.
This article is very interesting, many thanks to you Jon ..
I was facing the exact memory consuming issue for my AIR application, it has very simple interface but it retrieves instant updates from a single server on a local network, and there are about 80 client on the network each has the same application and each is doing the same data synchronization with server every 1 second!
first version was a disaster, it reaches ~500 mb of system memory usage by the end of the day, after a little search I found this article by Grant Skinner at adobe website:
http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html
After proper reconstructing to my ActionScript code by keeping an eye on Flash Player memory usage and object listeners week references I finally have a more reliable version of my application that consumes ~50 mb at max.
I agree with Tom, it is definitely a matter of coding and development, the runtime has nothing to do with it. may be it is much harder for developer than the old days, but I think this is a very useful feature, it make a developer taking full control over his code and performance, nothing fancy behind the scenes done by the runtime and the developer doesn’t know or understand.
Thanks for dropping by, xVisage.
Perhaps Adobe decided to make a trade-off – allowing advanced developers to better optimize and take control over their code, in exchange for lesser developers producing crappier, memory-bloated applications. It was a decision Adobe made,and we all live with it.
You would think though, more and more AS3 developers should be aware of the new garbage collection behavior and optimize their apps accordingly. However, you’ll be surprised how many search referrals I still get each day on this article for searches on terms like “Adobe”, “AIR”, “memory”, “bloat”, “problem”.
Hello Jon,
Your post is dated June 02, 2008. I hope you must have changed your opinion by now.
Do check cyn.in Desktop (Adobe AIR) app. cyn.in is an open source group collaboration software for enterprise.
cyn.in desktop provides activity stream of main cyn.in system to users and enables them to view, comment or discuss the content or context right there without taking them to web browser. It also serves as enterprise micro-blogging or presence system. A must review for you.
cyn.in Desktop is available here:
http://cyn.in/get-cynin/download-cynin-desktop-client
It has been my experience that the largest culprit for memory bloat in AIR (and Flex/AS 3 in general) applications are event listeners. By default when you attach an event listener it does not get garbage collected if you remove the object.
There IS however an easy way around this, you can use weak references on your listeners. I’ve now gone to always using weak referenced event listeners unless I have a reason not to. The useWeakReference argument is the 5th argument on the the addEventListener method it’s a bool and defaults to false.
What I find confusing in Adobe’s decision is the choice to make this the 3rd OPTIONAL argument when creating an event listener AND on top of that to default it to false, it would have made far more sense I think to default it to true. As it is, to use it you have to provide the other arguments just to fill the positions.
To be fair to AIR, the latest generations of Twitter apps like Seesmic Desktop and TweetDeck are much much better at memory management than earlier applications like Twhirl. I can run them 24/7 and memory footprints stabilize at around 200 MB or so.
This makes me believe that the memory problem is not so much with the language, but with the programmers. I guess AIR developers nowadays are just more aware of the memory management issues you described.
Still boggles me that a simple AIR app like the FriendFeed Notifier can use up to 230 MB of RAM for what little it does.
This is where I am hoping that the upcoming Silverlight 3 out-of-browser experience can deliver desktop-based apps with a much tighter memory footprint than comparable Adobe AIR apps.