Re: [OT?] Nib files balloon app size
Re: [OT?] Nib files balloon app size
- Subject: Re: [OT?] Nib files balloon app size
- From: arekkusu <email@hidden>
- Date: Fri, 11 Apr 2003 19:07:40 -0700
On Friday, April 11, 2003, at 05:15 PM,
email@hidden wrote:
Recently, I started moving my app's individual windows to separate
Nibs, as suggested by Apple's documentation to reduce resource usage at
runtime. However, I've found that the more Nibs I create, the larger my
app gets.
So I have 2 questions:
1. Is it reasonable for me to choose small app size over optimized
resource loading?
This probably depends how many dialogs you are going to end up having
and
how likely they are to be loaded at runtime.
You could, for example, put all the dialogs which you know are going to
be used
into one large nib, and optional dialogs in additional nibs.
If you look at Apple's apps which use Carbon .rsrc resources, they
generally only
have a few resource files per language, not one per dialog.
2. Why do more Nibs mean larger app size, when they have the same
number of windows/panels between them?
if you look at a nib in Terminal you'll see that it's actually a bundle
containing
three files.
Therefore there is a minimum size of 12k for each nib you add, on a
standard HFS+ disk.
If you are concerned about wasted disk space, you can nuke classes.nib
and info.nib
with a post-build script in your release target; those two are only
needed by IB to edit the nib.
But you will still have use a minimum of 4k per each nib due to the
disk block size.
Apple removed these development nib parts in some of the apps included
with the OS, but
not from others. In large apps, the extra 4k per file can really add up
when there are many nibs
and localizations, it's about 20 megs of wasted space in iPhoto, for
example.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.