discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision)


From: Richard Frith-Macdonald
Subject: Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision)
Date: Mon, 19 Jan 2004 13:56:03 +0000


On 19 Jan 2004, at 13:13, Kazunobu Kuriyama wrote:

Attached is a list of the files found in -core that contain the implementation of -initWithCoder:/-encodeWithCoder.

The data were taken from the current CVS repository several hours ago. Because the data were collected using regular expressions, it is
possible for some of the data to be bogus; however, the results seem
to be correct at large (I hope).

Hopefully, this gives a rough estimation of the time-cosuming part of the cost for accomplishing the keyed coding support.

The format of the list is
   $1: $2 $3:[ $2 $3: ...] $4:
where
   $1 -- file name
   $2 -- line number at which the implementation of $4 begins
   $3 -- line number at which the implementation of $4 ends
   $4 -- method name

The following are some statistics derived from the list.

   Total number of the decode and encode methods = 238
   Total number of the lines of the code         = 4738
   Average number of the lines of the code       = 19.9076

The average number may be misleading because the distribution is not Gaussian (Obvious). The distribution is as follows:

---------+--------------
 Range  | # of methods
---------+--------------
 0--  9 | 104 ( 43.7 %)
10-- 19 |  70 ( 73.1 %)
20-- 29 |  21 ( 81.9 %)
30-- 39 |  12 ( 87.0 %)
40-- 49 |  11 ( 91.6 %)
50-- 59 |   5 ( 93.7 %)
60-- 69 |   3 ( 95.0 %)
70-- 79 |   2 ( 95.8 %)
80-- 89 |   3 ( 97.1 %)
90-- 99 |   2 ( 97.9 %)
100--109 |   0 ( 97.9 %)
110--119 |   1 ( 98.3 %)
120--129 |   2 ( 99.2 %)
130--139 |   0 ( 99.2 %)
140--149 |   0 ( 99.2 %)
150--159 |   0 ( 99.2 %)
160--169 |   1 ( 99.6 %)
170--179 |   1 (100.0 %)
---------+--------------

This table shows that, broadly speaking, the modification is really time-consuming but relatively straight-forward, up to 90% of all the methods in question.


Yep ... especially time consuming as we want to reverse engineer the encoding of the apple classes .. which, as the internal structures of our classes differ from Apples, might mean we are archiving different information to what the current methods do, and reconstructing the information we need from that.

FYI I spent several hours writing updates to NSCode.[hm] for keyed archiving, and have started implementation of the NSKeyedArchiver and NSKeyedUnarchiver classes. I'm away from home (working on my laptop) for a few days, but expect to commit the work to CVS on wednesday or thursday.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]