• 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: is this string styled?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is this string styled?


  • Subject: Re: is this string styled?
  • From: Craig Dooley <email@hidden>
  • Date: Mon, 9 Jan 2006 14:16:31 -0500

Actually, the overhead is much less if you use larger files.  I
created a text file of 2646000 bytes in vim.  Paste this into textedit
and save as a rtf, and it is 2772314 bytes.  Paste it into Core Data
Stickies, and the file is 3529055 bytes.  Still about 1 1/3 times the
size of the straight text, but nowhere near the 50+ megs you were
implying.

I'm not trying to say that space is worthless, but you seemed to be
under the wrong impression of how much space would be wasted.

- Craig

On 1/9/06, Matt Neuburg <email@hidden> wrote:
> On Sun, 8 Jan 2006 01:02:35 -0800, Kevin Ballard <email@hidden> said:
> >I'm wondering at the purpose behind this. Is it really worth all the
> >trouble for this? A simple attributed string (one with just default
> >attributes) isn't much more space than the string itself.
>
> Not so. Try it yourself. You can use the Core Data Stickies example project
> as a test bed. A sticky that reads "This is a test.", which is 15
> characters, takes 256 characters in the resulting xml file. Now scale that
> up. My app typically stores, let's say, 5MB of little text snippets like
> that. If I can prevent the xml file from ballooning to something on the
> order of 100MB, I should do so.
>
> Now, to be sure, I may not be able to do so. But surely you must admit that
> it is in any case a reasonable design goal. Or perhaps you don't admit that?
> Perhaps you have unlimited storage space, and you like to imagine that
> everyone else does too, and that whoever doesn't is not worth considering as
> human. But I come from an age when computer resources of time and space were
> at a premium, and it was regarded as desirable to save storage space where
> possible; and I happen think it is a form of politeness and respect to one's
> users to continue this practice. And in my experience, a user who finds that
> an application's files seem disproportionately large will balk at using that
> application (indeed, I myself react in just that way).
>
> In any case I don't see why I have to describe and defend larger design
> goals merely in order to pose a simple technical question. Either I can or I
> can't learn whether an attributed string has the "default attributes", so
> that I can substitute a pure NSString for it. Perhaps I'll fail, but
> questioning the bona fides of my purposes, and implicitly advising me not
> even to try, is not on point.
>
> m.
>
> --
> matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
> A fool + a tool + an autorelease pool = cool!
> AppleScript: the Definitive Guide
> <http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
>
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>


--
-----------------------------------------------------------------------
Craig Dooley <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: is this string styled? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Setting values in InfoPlist.strings from Info.plist;
  • Next by Date: Re: is this string styled?
  • Previous by thread: Re: is this string styled?
  • Next by thread: Re: is this string styled?
  • Index(es):
    • Date
    • Thread