[darcs-users] Is darcs optimize --compress still useful?

Petr Rockai me at mornfall.net
Mon Mar 23 09:55:01 UTC 2009


trentbuck at gmail.com (Trent W. Buck) writes:
> Petr Rockai <me at mornfall.net> writes:
>> Not really. The difference is that uncompressed patches can be mmaped,
>> and are therefore more efficient than compressed (with saved space
>> being on the edge of measurability, since quite many compressed
>> patches take the same number of filesystem blocks as their
>> uncompressed counterparts...).
>
> So if I've understood correctly, we have *three* options (remove
> compression, put it back again, and dither) in order to support
> uncompressed patches -- a feature which
>
>   - increases disk consumption considerably;
See above: the compressed patches save very little actual space. You need to
cross a filesystem block boundary with your compression to be of any use.
>   - decreases RAM consumption negligibly; and
>   - decreases CPU time negliglibly.
Well, it probably does help with both probably as much as compression helps
with disk space usage. So I might be actually in favour of removing compression
for patches.

Compression is more useful for pristine.hashed for sed resilience, although the
hashing already does enough, IMHO, so I'd even uncompress the hashed pristine
(this would, with darcs as it is, save more cycles and RAM than it does for
patches). You however can't have mixed compressed/uncompressed pristine (due to
the possibility of adding gzip'd files to repository). We would have to
introduce a new pristine type (I'm working on one that would not need
compression and would still be more space-efficient than what we have now --
just concatenating a bunch of small files together often gives better size
reduction than actual compression... unless you maybe use one of those modern
filesystems).

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation


More information about the darcs-users mailing list