This post is a techy one, so if you don’t write AIR apps or if you think this wouldn’t be enough to show off during coffee break I recommend something funnier.
Working on a big fat AIR app (more than 400 Mb) I noticed something quite strange: using EncryptedLocalStore get/setItem methods happened to be slow, I mean very slow, but like, slow as hell (like 5 to 10 seconds per call) but only after launching the app, and not after. Something that I never noticed before ; neither with other AIR apps, nor for this one before I added its heavy content… And the tricky part is that it only occurred with a compiled app, but not within ADL.
I googled a bit and found this thread which is mainly about the stronglyBound parameter for setItem, but its last post by Oliver Goldman rang my bell:
The first time ELS is accessed the application’s signature needs to be verified, regardless of whether or not stronglyBound is set. If stronglyBound is set, then the signature is re-verified as the application is running. Either way, it’s expensive if you have a big application.
Small app: fast, fat app: slow as hell. Lesson learned…
And this is true both for Flash and HTML/JS AIR apps. So if you don’t need your data to be encrypted I highly recommend using SharedObject (or else) instead. As far as I’m concerned the first calls dropped from 5/10 seconds to a few milliseconds.
Bingo.




