Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

know app size prior to publishing?
Started by Joe C. Apr 24 2014 12:10 PM

* * * * * 1 votes
6 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Joe C.

[GLOBAL: userInfoPane.html]
Joe C.
  • Starter
  • PipPipPipPipPipPip
  • 166 posts
  • Jedi

The topic title says it all - Is there a way to know the size of an app before building it to device and/or publishing it?

 

Is it possible to know from within the IDE? I'm testing with the corona simulator at the moment and would like to know the exact size as well as how much memory it is using. Possible? Please advise. Thanks.



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

@Joe,

 

You're asking a couple of different questions it sounds like.

 

1. Can you know (exactly) how large the binary/package for your app will be before building it?  No, not really.  You can guess, but until you do the build, you don't know exactly. 

 

Also, be aware that debug builds are not the same size as final builds.  Why? Debug builds may contain extra code for debug hooks.  Final builds (especially on for iOS) go through additional steps (iOS does PNGCRUSH) which change the final package size.

 

2. How much memory your app uses is a different question.  There are different parts to this:

2a. 'Disk Storage' - How much space does the app take in the persistent storage on the device.  Close to, but not exactly the same as the image size.  Why?  Storage efficiency is different on different devices (as with disks) and the final size once stored may be a few kilo-bytes larger.  

 

2b. Memory once Loaded - Once the app is loaded it will take up an initial amount of memory.  This may grow over time.

 

2c. Long term memory usage - Over time, memory usage grows (rarely does it shrink).  Eventually, you usage may be more than the device can handle.   This could indicate a poor design (choice) or a leak.

 

There are tools available for measuring memory usage (in simulator and on devices).  RG Super Meter is one, but if you want to do things on the cheap, you can do memory calculations on your own or hunt for free tools too.

 

 

 

PS -

As with 'persistent' storage.  Memory usage as you see it in the simulator will vary slightly from what you see on the device, but behaviorally (i.e. leaks and huge growth) the simulator and device will have similar memory usage behaviors.  i.e. If you have a leak it will show up in the simulator as well as on the device so you can catch it early with the right instrumentation (tools).


Edited by roaminggamer, 24 April 2014 - 12:30 PM.


[TOPIC: post.html]
#3

Joe C.

[GLOBAL: userInfoPane.html]
Joe C.
  • Starter
  • PipPipPipPipPipPip
  • 166 posts
  • Jedi

I see. Im only asking these questions, because I noticed in my image editing program where I am creating my graphics, the file sizes are big because of the fact Im using HD graphics and photos. I like to do this to prepare for future devices.

 

I kind of thought the same at first about the memory, but couldnt find anything or one confirming it anywhere......

Anyway, Thanks for the response. I'll check out the RG meter you suggest. Thanks. B)



[TOPIC: post.html]
#4

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

I strongly suggest shrinking the images (not your original) using tool.  

 

When I go to publish my apps, I use TinyPNG and save about 50+% on the size of my PNGs.

 

The results are awesome.  Try this game and I don't think you'll see any issues with the graphics.is in the videos.

 

TinyPNG reduced my initial 77MB of images to 36MB.



[TOPIC: post.html]
#5

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Pro
  • PipPipPipPipPipPip
  • 1,113 posts
  • Jedi

...Doesn't Apple's build process handle this through using pngCrush? Or are you speaking of Android?



[TOPIC: post.html]
#6

jstrahan

[GLOBAL: userInfoPane.html]
jstrahan
  • Pro
  • PipPipPipPipPipPip
  • 1,922 posts
  • Jedi

I think apple does but I like to do it myself anyway. I use imageOptim

[TOPIC: post.html]
#7

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Enterprise
  • PipPipPipPipPipPip
  • 641 posts
  • Jedi

@Richard,

 

Yes.  PNGCRUSH is run automatically when you build for iOS, but I find that I get much better results if I pre-compress my own assets and using TinyPNG's service on my imags has never failed to make my final binary significantly smaller.  Actually, sometimes, PNGCRUSH makes the images bigger, but that is a discussion for another thread I think.

 

-Ed




[topic_controls]
[/topic_controls]