Launching and database of png images - iPhone
So, I'm actually making an iPhone app with a big library of guitar chords and scales. The scales are logical, so they are successfully draw by following musical theory.
On the other hand, I have a library of 4500 small png files (3ko) for the guitar chords.
My problem is that even if it's not used for the launch (but for a viewController who call them by a variable NSString like @"%@ chord_%@.png") the app link them (with the dyld) when the app launches.
So after the loading the app is very very fast, but it takes about 12 seconds to launch.
Image files are not linked into the app using dyld. You could perhaps use Instruments to pinpoint the slowdown more accurately, but it seems like you might consider a different solution than using 4500 individual images.
Is it possible for you draw these chords programmatically? Perhaps composite several simpler images together? Even at 3kb/image it seems like that many images would make your application download size significantly larger.
Are you reading all 4500 images at launch time? If so, dont. Instead, only read an image with it is needed the first time.