• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Build Settings for Release: App/Library is bloated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build Settings for Release: App/Library is bloated


  • Subject: Re: Build Settings for Release: App/Library is bloated
  • From: Miles <email@hidden>
  • Date: Sun, 12 Apr 2009 14:24:56 -0700

And BTW, my app is back down to 3.4MB after removing those classes and
adding the dictionary in as a text file! That issue is now solved -- now I
just need to figure out how to go about this approach :) awesome, thanks.



On Sun, Apr 12, 2009 at 2:19 PM, Miles <email@hidden> wrote:

>
> OK, it's gradually making sense, but i still have some questions. I started
> trying to do something like this a while back -- storing it all in one file,
> then loading it, but I think after that is where I went wrong. I created an
> array out of the contents and used it searched it way. I then decided to
> split it into separate files to make the searching faster.
>
> I am now trying to do what you are recommending, and I have the file loaded
> with:
>
>     NSString *filePath = [[NSBundle mainBundle] pathForResource:@"dictionary"
> ofType:@"txt"];
>     NSData *myData = [NSData dataWithContentsOfFile:filePath];
>
> My questions are now about how to store the contents, because I don't think
> a nsdata or converting it to an array is what I want. Googling with keywords
> I've gathered from your emails have given me hints about using mmap, but
> I've finding very little info on it or how to use it. Is that what I should
> be trying to figure out? Searching "shared prefix matching" and similar
> keywords aren't turning up much either, so i'm a little stuck. I'd
> appreciate another boost or two if you wouldn't mind.
> As usual, thanks a lot!
>
>
>
>
> On Sun, Apr 12, 2009 at 1:30 PM, Kyle Sluder <email@hidden>wrote:
>
>> On Sun, Apr 12, 2009 at 1:19 PM, Miles <email@hidden> wrote:
>> > In the meantime if you have a good link handy about how to do this I
>> would
>> > appreciate it.
>>
>> If you put something in the Resources directory of the app bundle, you
>> can use NSBundle's -pathForResource:ofType: and related methods to get
>> their paths.  Since you're working on iPhone, you need to be conscious
>> of the tradeoffs of compressing resources on-disk (and taking the
>> processor time to decompress them, either at startup or on load)
>> versus leaving them uncompressed (and consequently consuming more disk
>> space).  Making them static arrays, however, is probably not a good
>> idea.
>>
>> --Kyle Sluder
>>
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Build Settings for Release: App/Library is bloated (From: Miles <email@hidden>)
 >Re: Build Settings for Release: App/Library is bloated (From: Kyle Sluder <email@hidden>)
 >Re: Build Settings for Release: App/Library is bloated (From: Miles <email@hidden>)
 >Re: Build Settings for Release: App/Library is bloated (From: Kyle Sluder <email@hidden>)
 >Re: Build Settings for Release: App/Library is bloated (From: Miles <email@hidden>)

  • Prev by Date: Re: Build Settings for Release: App/Library is bloated
  • Next by Date: Re: Build Settings for Release: App/Library is bloated
  • Previous by thread: Re: Build Settings for Release: App/Library is bloated
  • Next by thread: Re: Build Settings for Release: App/Library is bloated
  • Index(es):
    • Date
    • Thread