Build size is too big! need help on optimization.

Hi guys,
When i create my device build i found that my build size is getting too big.
For eg. My project folder is of 2.95 Mb including images and all other lua files. I am using PNG for images for the project.
Project is just of ebook of 3 pages, so not much coding in files.
but when i compile build my app is of 7.42Mb, and i think its too big.
I am usin corona version(2012.812)

Application is running fine without any issue. I am just worried about my app size. Any help or tips on the same will be appreciated.

Thanks in advance.
[import]uid: 83799 topic_id: 26279 reply_id: 326279[/import]

You mean you think it should be smaller? because even 7.42 Mb is not that big.

My upcoming adventure is nearly 60 mb.

But if you use a lot of JPG files, you might want to save them with 80% quality instead of 100% no compression. I did that without any noticable quality loss and saved 5 mb.

Same with mp3 music, 128 Kbks instead of 256 Kbps.

[import]uid: 50459 topic_id: 26279 reply_id: 106522[/import]

I dont think 8mb is anything to worry about. Thats actually kind of small. Now if its over 25mb then you have to start worrying about users downloading it over there data connections.

Try lowering the resolution of your images if you really need to save space.

-Chandler Mayo [import]uid: 104852 topic_id: 26279 reply_id: 106556[/import]

Thanks guys for the reply…

I am feeling ok now as all you guys saying that build size is good.
I was just thinking on why app size is getting big (7.44MB) when my actual project folder is just of 2.55 MB

But as you all said its not big then its cool…
Thanks guys
[import]uid: 83799 topic_id: 26279 reply_id: 106625[/import]

I’m considering Corona and wondering about developed App size in general as I know sometimes SDKs can “bloat” final runtime package. How does Corona compare in size to Apps delivered with other tools/platforms?

Specifically for this thread, is the extra size the original Poster wanted to optimize caused solely by the PNG files or is there significant code overhead?

Thanks,
Bob [import]uid: 90340 topic_id: 26279 reply_id: 107474[/import]

It will be in part to do with the libraries that Corona includes during the build process. I’m hoping that Ansca are working on some kind of flag system that allows developers to uninclude libraries that they don’t need - and help to reduce overall binary sizes.

Obviously as developers we can ensure we’ve reduced everything on our end as much as possible, but there’s only so far you can go. [import]uid: 33275 topic_id: 26279 reply_id: 107478[/import]

Your source folder doesn’t include the compiled binary program. All of those Corona SDK API calls you make require some code to be run. display.newImageRect() may look like one line to you, but the actual code to do all that work is pretty big. When you add up all the API calls it ads up. A 7mb app is tiny.

[import]uid: 19626 topic_id: 26279 reply_id: 107491[/import]

Yes 7 meg is small BUT if you are planning on updating your ebook with much more pages (say 30 pages) then those add up! In that case I would suggest to listen to rmbsoft about using jpeg at 80% to save some serious space. Same about sound files. Of course if 3 pages is the end result then you are set.

Good luck on your app!

Mo [import]uid: 100814 topic_id: 26279 reply_id: 107497[/import]

Thanks for all your sharing…and support. [import]uid: 83799 topic_id: 26279 reply_id: 107525[/import]

I do the JPEG thing for my backgrounds, anything I don’t need transparency for, but someone posted on the forums a couple of weeks ago, that Apple actually compresses the PNG’s more than a native PNG would during the build process and the PNG files end up being as small as JPEGs. After reading that, I’m not sure how much JPEGs are going to save you unless you really compress the bejeebies out of them. [import]uid: 19626 topic_id: 26279 reply_id: 107596[/import]

I tested a full screen JPG (1024x768) and save it as JPG, it’s 149 KB.

Save the same file as PNG gives me a PNG of 811 Kb.

I don’t think Apple can compress the living daylights out of that PNG to make it < 149 kB?

Funny thing: When I create a RAR file out of full screen.jpg it creates a 138kb Rar file. When i create a rar of the 811 kb PNG file it creates a 811 kb rar file :slight_smile:

Rar doesn’t seem to be able to compress PNG’s…

Another thing: Doesn’t a 811 kb PNG file consume more memory on the device? An uncompressed highest quality JPG file would be 281 Kb.

[import]uid: 50459 topic_id: 26279 reply_id: 107649[/import]