[Mono-dev] File System-like storage

Rafael Teixeira monoman at gmail.com
Thu Aug 31 09:41:41 EDT 2006


Packed file systems (or any other data representation for that matter)
are good for read-only purposes. Any read-write use will need to
"re-pack" things and will suffer badly, that is why normal file
systems leave "holes" (by allocating fixed-size blocks) and scatter
file contents as a consequence of allocating new space on demand.

You can try to optimize space by using the exact number of bytes a
file-write needs, but you can't avoid scattering the contents.

Even those optimizations aren't good enough to deal with changes in
the middle of the contents of file, specially if the contents will
change in size also. It will degrade in to "erasing"/freeing the
previous "tail" of the file and allocating/writing the new "tail" what
needs the contents of the old tail so unless you can buffer it all on
memory means you can't just overwrite to avoid a "freed" hole.

Well that is basically the description of a journalling file-system,
and you get back where you started.

:|

On 8/31/06, pablosantosluac <pablosantosluac at terra.es> wrote:
> but, can you add files??
>
> I tried with a commercial tool, and setting compression off... was horrible
> for performance inserting data...
> ----- Original Message -----
> From: "Robert Jordan" <robertj at gmx.net>
> To: <mono-devel-list at lists.ximian.com>
> Sent: Thursday, August 31, 2006 10:41 AM
> Subject: Re: [Mono-dev] File System-like storage
>
>
> > pablosantosluac wrote:
> >> Hi,
> >>
> >> Is there any library that can be used to store a file system like
> >> structure
> >> inside only one file? Ok, don't tell me a ZIP file... I already tried and
> >> performance is quite bad (tried with different libraries even)...
> >
> > Already tried with compression turned off?
> >
> > We're using ICSharpCode.SharpZipLib with huge (600MB) uncompressed
> > ZIPs containing a lot of small files. The performance is better
> > than using a true file system.
> >
> > Robert
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw



More information about the Mono-devel-list mailing list