1

I have an app that has quite a large number of good sized images in it. Currently all the images are in the main application bundle. When app loads it takes about two seconds for the landing image to be replaced with the actual UI. Is load time related to bundle size, i.e. would having a smaller main bundle decrease load times? Would placing the images in another bundle decrease load time or is the overhead of loading more then one bundle actually detrimental?

Thanks

cramhead
  • 867
  • 7
  • 16

2 Answers2

2

The actual executable file is contained inside the bundle (like bundles in an OS X application's package). The bundle is really just a way of packaging all your resources together and it's size shouldn't affect your application's load time. Those resources aren't getting loaded when the app is run (unless you are doing something to load them).

http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/AboutBundles/AboutBundles.html

A bundle is really just a directory:

A bundle is a directory with a standardized hierarchical structure that holds executable code and the resources used by that code.

And you should include all of your images:

Applications should always include all of the images, strings files, localizable resources, and plug-ins that they need to operate [inside the bundle]. Noncritical resources should similarly be stored inside the application bundle whenever possible but may be placed outside the bundle if needed. For more information about the bundle structure of applications, see “Application Bundles.”

Steve
  • 29,538
  • 18
  • 94
  • 121
2

Placing the images in a different bundle will not speed up app launch. Instead you should look at lazy loading optimization. Only load what you need when you need it.

What is Lazy Loading?

How to lazy load?

Optimizing iPhone Application Launch Time

Community
  • 1
  • 1
Andrew
  • 2,692
  • 21
  • 27