Re: [Evolution-hackers] compression for folders?



On Mon, 2004-05-10 at 15:28, Jeffrey Stedfast wrote:
> you are forgetting the fact that folders are generally not read-only,
> and so in order to write any new data to the gzip file, you'd have to
> rewrite it from scratch which negates any speed improvements you could
> possibly claim.

ray:~$ echo hello | gzip >test.gz
ray:~$ echo world | gzip >>test.gz
ray:~$ zcat test.gz
hello
world
ray:~$

As long as the archive folders only support appending, there's no need
to rewrite the entire file. Further, there's no need to even keep it in
one big file (and many good reasons not to). Partition the archives by
month, or something.

> also, as a curiosity, I actually tested this theory and it doesn't hold
> true. reading/inflating a gzip file off disk is no faster than reading
> the non-compressed file off disk, *and* inflating the gzip file pegs the
> cpu so if the app was doing other things then it would negatively impact
> performance of those other operations.

This rather obviously depends on CPU speed versus disk speed, yes? If I
had a modern CPU with a device that had a transfer speed of 1 byte a
second, compressing the stream is an obvious win. If I have a device
with a transfer speed of 1 GB/s, it's an obvious loss.

As with anything in ComSci, it's a tradeoff.

I think having some sort of support for an archive system is probably a
good thing. But the feature has to be balanced by what the team has time
to support, and from my lurking it sounds like they're already a bit
overworked.

Ray




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