Re: archiving report

2013-02-28 Thread Gerriet M. Denkmann
On 28 Feb 2013, at 21:52, Graham Cox wrote: > > On 01/03/2013, at 1:12 AM, "Gerriet M. Denkmann" wrote: > >> So nibs seem to be bloated by 7 ... 22 % > > > Serious question. Is it really worth obsessing about 22% of a few K in this > day and age? Probably not. Kind of personal obsession.

Re: archiving report

2013-02-28 Thread Graham Cox
On 01/03/2013, at 1:12 AM, "Gerriet M. Denkmann" wrote: > So nibs seem to be bloated by 7 ... 22 % Serious question. Is it really worth obsessing about 22% of a few K in this day and age? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: archiving report

2013-02-28 Thread Gerriet M. Denkmann
On 28 Feb 2013, at 14:41, Kyle Sluder wrote: > On Feb 27, 2013, at 10:46 PM, "Gerriet M. Denkmann" > wrote: > > . Where are your stats about serializing and de serializing real world > archives? For NIBs vs for the kind of object graphs that are sent over DO > connections? The 5 nib files

Re: archiving report

2013-02-28 Thread Gerriet M. Denkmann
On 28 Feb 2013, at 14:41, Kyle Sluder wrote: > > All you have shown is that NSKeyedArchiver is not optimized for your > contrived use case. Whenever some object is used (referenced from some other object) n times there are n-1 unnecessary object references created. This might happen in real

Re: archiving report

2013-02-27 Thread Kyle Sluder
On Feb 27, 2013, at 10:46 PM, "Gerriet M. Denkmann" wrote: > > On 28 Feb 2013, at 02:28, Tony Parker wrote: > >> On Feb 26, 2013, at 10:56 AM, Gerriet M. Denkmann >> wrote: >>> >>> On 27 Feb 2013, at 01:00, Gwynne Raskind wrote: >>> > 2. NSKeyedArchiver seems to be ok. >But i

Re: archiving report

2013-02-27 Thread Gerriet M. Denkmann
On 28 Feb 2013, at 02:28, Tony Parker wrote: > On Feb 26, 2013, at 10:56 AM, Gerriet M. Denkmann > wrote: >> >> On 27 Feb 2013, at 01:00, Gwynne Raskind wrote: >> 2. NSKeyedArchiver seems to be ok. But it does create unnecessary data. E.g. in the case of an array containi

Re: archiving report

2013-02-27 Thread Jens Alfke
On Feb 27, 2013, at 11:28 AM, Tony Parker wrote: > Out of curiosity, what do you expect to happen if your string is @“ab” or > something even longer, but repeated 1 million times? Your test implies that > the answer is 2,000,000 but in fact the answer is that it only grows one more > byte. Th

Re: archiving report

2013-02-27 Thread Tony Parker
Hi Gerriet, On Feb 26, 2013, at 10:56 AM, Gerriet M. Denkmann wrote: > > On 27 Feb 2013, at 01:00, Gwynne Raskind wrote: > >> On Feb 26, 2013, at 12:47 PM, Gerriet M. Denkmann >> wrote: >>> My investigations regarding archiving on OS X: >>> >>> 1. NSArchiver stores all strings in Utf-8. >>

Re: archiving report

2013-02-27 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 02:17, Kyle Sluder wrote: > I understand the frustration caused by Apple's embarrassing penchant for not > fixing bugs. > But refusing to report future bugs is only going to harm yourself. Grudgingly I did: NSKeyedArchiver creates bloated archives. Your tracking number for

Re: archiving report

2013-02-26 Thread Ben Kennedy
On 26 Feb 2013, at 4:20 pm, Graham Cox wrote: > I would hesitate to suggest it, but if you are routinely storing NSNull (or > @"$null") in arrays, it might point to a flaw in your own design. As someone pointed out earlier, this bug makes NSKeyedArchiver unusable for any data model that contain

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 02:17, Kyle Sluder wrote: > On Tue, Feb 26, 2013, at 11:06 AM, Gerriet M. Denkmann wrote: >> You can create and archive (with NSKeyedArchiver) illegal strings. >> unichar u = kUCHighSurrogateRangeStart; >> NSString *s = [ NSString stringWithCharacters: &u length: 1]; > > You

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 07:20, Graham Cox wrote: > > On 27/02/2013, at 5:56 AM, Gerriet M. Denkmann wrote: > >> I have filed the $null bug. Got back as duplicate with a very low id-number. >> Meaning: this bug is known to Apple since several years. Still no fix. > > > Frustrating for sure, but

Re: archiving report

2013-02-26 Thread Graham Cox
On 27/02/2013, at 5:56 AM, Gerriet M. Denkmann wrote: > I have filed the $null bug. Got back as duplicate with a very low id-number. > Meaning: this bug is known to Apple since several years. Still no fix. Frustrating for sure, but in this particular case, I wonder whether there even is a fi

Re: archiving report

2013-02-26 Thread gweston
 Alex Zavatone writes: If we spend the time to enter bugs that don't get fixed, it ends up being a waste of our time. We have no control over if Apple choses to fix our bugs or not. Do we waste time working around a bug, then waste time reporting it? I've got capitalization on an NSString fa

Re: archiving report

2013-02-26 Thread Alex Zavatone
Nice tip and it's great to hear of your issues getting fixed. I feel what is important about this is that we keep an open copy of the issues we find (I know this was mentioned here before) and use open radar so that we can profit from each other's experience/grief when we run into bugs and repo

Re: archiving report

2013-02-26 Thread William Sumner
On Feb 26, 2013, at 12:06 PM, "Gerriet M. Denkmann" wrote: > > When Apple helps me by fixing bugs, I will helping Apple by reporting them. > Apple knows since years that NSKeyedUnarchiver is broken and does nothing. Regardless of what they ultimately fix, filing bug reports is the best way to

Re: archiving report

2013-02-26 Thread Alex Kac
Sometimes I feel the same way; that said I've had over a dozen reported bugs fixed by Apple on iOS over the last 4-5 years. On OS X, very few. So I know they do care about it, but I also find sometimes that I get a better result if I report the bug via RADAR and THEN also post about it on the Dev F

Re: archiving report

2013-02-26 Thread Alex Zavatone
If we spend the time to enter bugs that don't get fixed, it ends up being a waste of our time. We have no control over if Apple choses to fix our bugs or not. Do we waste time working around a bug, then waste time reporting it? I've got capitalization on an NSString failing at the moment w

Re: archiving report

2013-02-26 Thread Kyle Sluder
On Tue, Feb 26, 2013, at 11:06 AM, Gerriet M. Denkmann wrote: > You can create and archive (with NSKeyedArchiver) illegal strings. > unichar u = kUCHighSurrogateRangeStart; > NSString *s = [ NSString stringWithCharacters: &u length: 1]; You might be able to do it now, but you certainly can't rely

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 01:04, Kyle Sluder wrote: > On Feb 26, 2013, at 9:47 AM, "Gerriet M. Denkmann" > wrote: > >> My investigations regarding archiving on OS X: >> >> 1. NSArchiver stores all strings in Utf-8. >> This is inefficient for strings which contain mainly non-european >> character

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 01:00, Gwynne Raskind wrote: > On Feb 26, 2013, at 12:47 PM, Gerriet M. Denkmann > wrote: >> My investigations regarding archiving on OS X: >> >> 1. NSArchiver stores all strings in Utf-8. >> This is inefficient for strings which contain mainly non-european >> charact

Re: archiving report

2013-02-26 Thread Sean McBride
On Wed, 27 Feb 2013 00:47:35 +0700, Gerriet M. Denkmann said: >2. NSKeyedArchiver seems to be ok. One problem I know of with NSKeyedArchiver: It has methods like encodeInt32:forKey: but no unsigned variants . (Good thing I filed the bug, I'm sure Apple will get right on it, eh Gwynne? :) So

Re: archiving report

2013-02-26 Thread Kyle Sluder
On Feb 26, 2013, at 10:04 AM, Kyle Sluder wrote: > On Feb 26, 2013, at 9:47 AM, "Gerriet M. Denkmann" > wrote: > >> But it does create unnecessary data. E.g. in the case of an array >> containing identical objects, like: >> NSArray *a = @[ @"a", @"a", , @"a"]; >> With 1 000 000 item

Re: archiving report

2013-02-26 Thread Kyle Sluder
On Feb 26, 2013, at 9:47 AM, "Gerriet M. Denkmann" wrote: > My investigations regarding archiving on OS X: > > 1. NSArchiver stores all strings in Utf-8. >This is inefficient for strings which contain mainly non-european > characters (e.g. Chinese or Thai) as one character will use 3 bytes

Re: archiving report

2013-02-26 Thread Gwynne Raskind
On Feb 26, 2013, at 12:47 PM, Gerriet M. Denkmann wrote: > My investigations regarding archiving on OS X: > > 1. NSArchiver stores all strings in Utf-8. > This is inefficient for strings which contain mainly non-european > characters (e.g. Chinese or Thai) as one character will use 3 bytes

archiving report

2013-02-26 Thread Gerriet M. Denkmann
My investigations regarding archiving on OS X: 1. NSArchiver stores all strings in Utf-8. This is inefficient for strings which contain mainly non-european characters (e.g. Chinese or Thai) as one character will use 3 bytes (Utf-16 would use only 2). Corollary: It cannot store st