Re: Resource Size

GWRepJohnH@aol.com
Mon, 30 Dec 1996 11:43:14 -0500

Hi Ed,

> DOCUMENT_TEXT 10092 471
> Warning: DOCUMENT_TEXT is very large, that is a BAD thing.
>
> I have a lot of fixed strings in there which I'm going to move into a data
> resource, but how important is it that I do it? This app is for the
desktop.

As I understand the system, you're dealing with two different things here.
All the resources ending in _TEXT are your source code files. These are
generally easy to get back down to the 4-6K recommended size limit. All you
do is break that source file into two or more separate files, and voila, that
resource is reduced. As Lee said though, this isn't a problem for the
desktop - especially when the resource in question is a source code resource.
(Can someone in Alameda back me up on this?)

Putting strings into a data resource - the other matter - is good for two
reasons. First it allows for easy localization using ResEdit. ResEdit only
"sees" strings in resources. Second, it allows you to manage the size of a
more critical resource, the fixed size (also called dgroup.) The fixed size
is the that amount of memory required to run your app that won't be swapped
around by the memory manager. You see its size in two places. It is the
second line of the resources table (your snippet above) and is the second
part of the file size line (eg: file size: 1,234 bytes fixed size: 123
bytes.) Text strings not in resources will drive the fixed size way up.
Glue gives you a nasty-gram when fixed size exceeds 1024 bytes.

I hope this doesn't muddy things up too much...
John ;-)