[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: I'll help with db debugging

From: Deven T. Corzine <deven_at_ties.org>
Date: 2001-04-05 20:41:31 CEST

On Thu, 5 Apr 2001, Garance A Drosihn wrote:

> For what it's worth, in the days of NeXTSTEP, objects were
> stored in things called "NIBs". These were binary files for
> efficiency reasons, but I have the impression that many
> developers felt they would have been better as plain-text
> files of some format.
> Going with binary formats makes more sense if you know you
> will be isolated to a specific architecture, but if these
> files are going to be the same across many architectures
> (little-endian vs big-endian, 32bit vs 64bit, etc), then
> the program needs to be careful when reading/writing that
> binary info anyway. So, going to some plain-text format
> isn't all that much more of a performance hit.

Hi Garance! (I thought your last name was Drosehn, as in your signature?
Why does your email address seem to be based on a spelling of "Drosihn"?)

Yeah, that's a good point. The performance hit may not be that bad, or at
least not necessarily so. Simple text-based formats (e.g. RFC822 headers)
can be easily parsed -- complex ones like XML may take a more noticable
performance hit. But I'll agree that the performance hit isn't outrageous.

There remains an efficiency question, in terms of space used. While it may
be complex to handle the endianness and wordsize issues, binary formats are
almost invariably more compact. Of course, they tend to be less flexible
and (of course) unreadable, so there's clearly a tradeoff. I'm not sure if
space efficiency should be ignored as a factor, especially a system like
Subversion that's designed as a repository for data. (Although the obvious
counterargument is that memory and disk keep getting cheaper -- who cares?)

Another possibility might be to use a text-based format, but use Zlib to
compress the files (in gzip-compatible format) for space efficiency in
storage -- this could provide the transparency and convenience of a text
format with the space efficiency of a binary format. Of course, that would
come at an even greater performance cost...

Received on Sat Oct 21 14:36:28 2006

This is an archived mail posted to the Subversion Dev mailing list.