Re: Progress for archiving/dearchiving
Re: Progress for archiving/dearchiving
- Subject: Re: Progress for archiving/dearchiving
- From: Chris Devereux <email@hidden>
- Date: Mon, 16 Sep 2013 15:25:34 +0100
How about tracking the number of written objects when saving the document,
then encoding an additional key containing the object count at the top
level of the archive? This could then be retrieved before decoding the root
object.
A possible problem with this idea is that it might require the data for the
root object to be read into memory before the count can be read. Maybe this
wouldn't be a problem with a binary format --- I don't know enough about
the implementation of NSKeyedArchiver/Unarchiver to be sure.
On 16 September 2013 13:53, Graham Cox <email@hidden> wrote:
> Hi all,
>
> If I wanted to add some sort of progress reporting to archiving and
> dearchiving, what's a good way to do it? The problem seems to me to know
> what the 'count' of things read from/written to the file is to set the
> progress max value. Since the delegate gets called for each object
> instantiated, that part of it isn't a problem, I can just bump a counter.
> Counting the objects rather than actual bytes is probably as fine-grained
> as I need to get.
>
> --Graham
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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