MusiGenesis
MusiGenesis

Reputation: 75356

Is 5 MB too large for a BlackBerry application?

I'm involved with a legacy BlackBerry appplication, where the COD install file is about 5 MB in size (mostly from embedded images and such). Is this size anything to be concerned about? Should a BlackBerry app generally be smaller in size, and why?

Upvotes: 2

Views: 437

Answers (3)

Marc Novakowski
Marc Novakowski

Reputation: 45408

Some great answers to this question so far. One thing I'd like to add is that if you have duplicate images in your app (to support different screen sizes on different devices) - then consider creating different builds of the app that only use the images for a particular screen size. If you also target different OS versions, this might multiply the total number of builds quite a bit - but if you're concerned about application size then it is a good approach.

Upvotes: 3

Vit Khudenko
Vit Khudenko

Reputation: 28418

Well I don't think 5Mb is too much for a modern smartphone. Anyway if your app does really need all of the images then you just have no other choice than to have a big code file. In some cases of a slow internet this could produce a slow OTA installation process. So some impatient users may cancel installation. To overcome slow install some devs separate core code from resources, so the resources are being downloaded after the OTA installation, on a first app run, probably under popup or some sort of setup wizard. This is of course makes the startup code harder to implement.

Another concern I can think of - are the images optimized in size? BB displays colors in a 16 bit per color channel scheme (RGB 565) regardless of your image color depth. So it worth to preprocess all the images (if not already) through some 565 filter. There are few Photoshop plugins for this. However don't count on a huge size reducing. For a 5 Mb image set you maybe will get just a 1 Mb "discount" (20%), so anyway you'll still have several MBs.

And the final note - be sure to properly architect your classes in order to properly utilize RAM. Most likely you have your image resources in a form of some compressed image formats (JPG, PNG). So in that form they are relatively small, however when they become a Bitmap then each pixel of a bitmap area eats at least 2Bytes or at most 4Bytes (it depends on Bitmap type). Make sure you don't play too much with a static stuff, because once loaded it will live (eating RAM) till the very app end unless you manually nullify it.

Thanks.

Upvotes: 2

Zalastax
Zalastax

Reputation: 361

You should try to optimize your images first. Running images trough http://www.punypng.com/ is a great way to do that. See if some images could be replaced by a smaller one or try to make use of the same image as often as possible.
The Blackberry devices have 32 or 64 or 128 MB RAM depending on model. You need to consider if all those 5 Mb will be used in memory at the same time or if it will use smaller or bigger amount. Remember that you could make an application 40 MB big in RAM but then no other apps could be ran.

Upvotes: 2

Related Questions