discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Should the format used by NSArchiver be changed to XML?


From: Wim Oudshoorn
Subject: Re: Should the format used by NSArchiver be changed to XML?
Date: Wed, 23 Apr 2003 00:19:49 +0200
User-agent: Mutt/1.4.1i

On Tue, Apr 22, 2003 at 11:06:45PM +0200, Lars Sonchocky-Helldorf wrote:
> On 22.04.2003 19:36:59 Martin Brecher wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Lars Sonchocky-Helldorf wrote:
> >[cut]
> >|
> >| Go for XML. Memory (both RAM and HD) is cheap these days.
> >|
> >
> >To save disk space you could even zip/gzip the files/bundles like
> >Openoffice does. Iirc gnustep has zlib support, right?
> 
> I don't like that since you'll always need a tool (gzip) to process the 
> content of such files. And, the human readability, the greatest pro of XML 
> is gone.
> 
> However how large do gorms/nibs usuallly get? I would not be to greedy for 
> some K's of memory...

gorm files are not the only place that NSArchiver is used.
And as I mentioned earlier, in our program we have archived
files that are larger than 100Mb.  (And note that we already
split the total archive in smaller parts and this is just
one of the parts.)  

Now even is HD space and RAM is cheap you still have the 
following problem, address space is limited to 2Gb on
windows and max 4Gb on other systems.

2Gb sounds like a lot, but it is NOT.
Picture this:

reading in 100Mb in an NSData.  Unarchiving this,
will lead to roughly 600Mb of used memory.  
This is doable, although due to address space
fragmentation just barely.  
Now picture the ratio of XML over binary format as
it is now.  This ratio will be in the range of 
5 to 10.  That means 500Mb to 1Gb file that
is read into memory.  Now for fun try to allocate
a 1Gb continuous block of memory in a running
application.   

Wim Oudshoorn.




reply via email to

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