Compressing final build files

Hey again,

mygamingproject, could you please report a bug using this form; http://developer.anscamobile.com/content/bug-submission

This isn’t a widespread issue and I am unable to replicate it but if that was the only line then clearly something is up.

If you post the bug # here once filed I can bring it up in our next meeting as well.

Thanks,
Peach :slight_smile: [import]uid: 52491 topic_id: 19789 reply_id: 77206[/import]

Bug submitted: case number #11291

More extensive example can be provided if unable to replicate [import]uid: 103970 topic_id: 19789 reply_id: 77278[/import]

@mygamingproject are you doing a build against a development provisioning profile or an AdHoc or a Release to the Store profile?

Development keeps debugging symbols which “could” drastically increase your bundle size.
As for how I manage my projects… For each project I have a top level folder:

MyGame Project

Inside that folder I have:

MyGame
Resources

And if I may add other features like a lite version will have its own folder, I may also have a marketing folder and others as needed, but the idea is that my Photoshop PSD files, original sound files and such all go in Resources. The only thing that goes into the “MyGame” folder are the lua files and the production assets.

[import]uid: 19626 topic_id: 19789 reply_id: 77296[/import]

@robmiracle what do you mean by debug or development profile. I have a distribution profile of the app store which under Xcode I would choose either debug or release I don’t believe there is that option under Corona.

Either way this still wouldn’t explain the difference in size by simply adding the gamenetwork unless of course it was heavily reliant on debug symbols. [import]uid: 103970 topic_id: 19789 reply_id: 77301[/import]

In the Provisioning portal, you can create either a development profile or a distribution profile. Distribution profiles have two variants: Release and Ad Hoc.

I download them, drop them in my ~Library/MobileDevice/Provisioning Profiles/ folder.

Then from Corona SDK when I hit the Build command, I pick which profile I want to build against. I never go into XCode except to copy the app to my device from my AppBuilds folder.

If I pick the development profile I know I can run Instruments against it. If I pick one of the the two distribution profiles I cannot. I have concluded from that observation that debugging symbols must be maintained when you do a build against a development profile.

I can’t see it adding 13 megabytes in size though.
[import]uid: 19626 topic_id: 19789 reply_id: 77305[/import]

Sorry I misunderstood your answer. Yes I do have both development and distribution certificates and while my initial thread was around general size it has become more specific around the 13MB uplift from gameNetwork [import]uid: 103970 topic_id: 19789 reply_id: 77307[/import]

Some progress:

I deleted the current Stable build Version 2011.704 (2011.12.8) from the mac

Re-downloaded and installed stable build 2011.704 (2011.12.8) and compiled with gamenetwork and still file 20.1MB

Downloaded and installed custom build i.e 24/12/11 daily build (Version 2011.715 (2011.12.8)) and recompiled and the file was reduced to 12.6MB

Some movement in the right direction but if you then compare the build against the rest of the figures bearing in mind I am now using a distribution profile:

WIthout gamenetwork: 3.7MB
With gamenetwork: 12.6MB

So even though the figures are getting closer to what I would expect again the only difference between the two is two lines of code:

[lua]local gameNetwork = require(“gameNetwork”)
gameNetwork.init( “openfeint”, " XXXXXX", “XXXXXX”, “XXXXXX”, “000000” )[/lua]

I’ll update once I get feedback from my bug request [import]uid: 103970 topic_id: 19789 reply_id: 77390[/import]

Some quick points:

  • OpenFeint is *huge* hence the build bloat. If you ever open up the .app bundle with OpenFeint, you’ll see tons of files.

  • Xcode Simulator is smaller (until recently) because we only need to build 1 architecture (i386). iOS (until recently) we build 2 architectures (armv6 and armv7) so it is bigger.

[import]uid: 7563 topic_id: 19789 reply_id: 77412[/import]

Wow… @mygamingproject, you’re right about gameNetwork bloating the file size. After seeing both yours and Eric’s posts above, I decided to take the time and comment out every line that require gameNetwork from my game to see what would happen, and surprise, surprise, surprise:

Without gameNetwork: 11.2MB
With gameNetwork: 17.7MB

I’m using daily build 706, and size increase isn’t as big as yours, but 6.5MB is still significant.

And I’m sorry, I was grossly over-estimating my pre-gameNetwork game size. I haven’t paid attention to my game size until recently (started looking sometime in December), and I don’t remember seeing it being less than 16MB.

Naomi [import]uid: 67217 topic_id: 19789 reply_id: 77473[/import]

EDIT: please see my post below (post#29). With my game, it turns out that the actual file size increase is 6.5MB using daily build 706.


@mygramingproject, that really is strange.

FYI, the device build of the current version of my game that Corona spits out is 17.7MB (.app build). I sort of remember that my game was less than 17MB before I added 0.3MB worth of sound files and gamenetwork (and before I removed some 0.5MB to 0.75MB worth of no-longer-needed graphics files from my project directly), so I really doubt gamenetwork inclusion upped the file size of my game that much.

By the way, I don’t know if it makes any difference but I require gamenetwork like this (i.e., without local in front):

[lua]-- only once in main.lua
gameNetwork = require “gameNetwork”[/lua]

Naomi [import]uid: 67217 topic_id: 19789 reply_id: 77092[/import]

Thanks guys,

this is yet another very useful thread I’m glad I came across it.

P.
[import]uid: 81718 topic_id: 19789 reply_id: 77555[/import]

Right I have now got to where I want to with this and the solution was (as always) reasonably straight forward. I have become a little obsessed with compilation size.

So as a recap I had my reasonably straightforward app at the following sizes:

WIthout gamenetwork: 3.7MB
With gamenetwork: 12.6MB

However what I realised and not an obvious error was that I was making the build file go back to the source folder. The issue here is that it becomes reciprocal in the compilation process so your app will become part of the app therefore bloating unnecessarily.

To get round this just create another folder as your target output so I created a folder called build on my desktop to output the app file to and got the following results

WIthout gamenetwork: 2MB
With gamenetwork: 6.4MB

Bingo!!!

Hope this helps [import]uid: 103970 topic_id: 19789 reply_id: 77626[/import]

Hey, @mygamingproject, thank you for the update!

I’m wondering if/when you compile your project using daily build 706 (or 704), the file size increase would be closer to 6.5MB (as opposed to 4.4MB when using daily build 715). I’d so appreciate it if you can check it so that we all know the 2.1MB in difference between your result and mine boils down to supporting 2 architectures vs. 1 architecture that Eric noted above?

Naomi [import]uid: 67217 topic_id: 19789 reply_id: 77635[/import]

Not sure if this helps but:

704 10.2MB
715 6.4MB
[import]uid: 103970 topic_id: 19789 reply_id: 77640[/import]

Thank you for checking, @mygamingproject! Wow, there’s 3.8MB in difference between the builds! I wonder why the file size increase is so different between mine and yours… Anyhow, it’s really good to know. Thanks again.

Naomi [import]uid: 67217 topic_id: 19789 reply_id: 77644[/import]