Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 630284 - catalyst: please compress .CONTENTS file
Summary: catalyst: please compress .CONTENTS file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-07 21:51 UTC by Robin Johnson
Modified: 2020-04-17 19:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-09-07 21:51:58 UTC
Please compress the .CONTENTS files. bzip2 is fine and gets very good compression (better than xz on this workload). 12:1 compression seems common in this, a huge savings.
Comment 1 Michael 'veremitz' Everitt 2019-05-04 21:26:01 UTC
I think I'm tempted to add a somewhat more expandable gen_*_file function in genbase.py where you could select (through catalyst.conf) a desired compression algorithm, and we can then update this easily as/when needed.

I have no problem with testing and adding bz2 as a default, and perhaps gzip and xz as alternatives for the time being.

Adding @dol-sen for any particular thoughts on this...
Comment 2 Larry the Git Cow gentoo-dev 2020-04-17 19:52:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bb21b8615e64cb31fa9aa9d533ef328dc1374e45

commit bb21b8615e64cb31fa9aa9d533ef328dc1374e45
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-04-17 18:03:02 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-04-17 19:51:32 +0000

    catalyst: gzip the .CONTENTS file
    
    Other algorithms give better compression ratios, but the difference is
    not meaningful for a 2MiB text file. In my testing bzip2 gave a better
    compression ratio of 15:1 vs gzip's 11:1, but that ends up being only a
    size difference of 50KiB (136 vs 187) which is only an additional 2.5%
    savings from the uncompressed input.
    
    Choose gzip because transparent decompression is widely supported by web
    servers and clients.
    
    Closes: https://bugs.gentoo.org/630284
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 catalyst/base/genbase.py | 5 +++--
 catalyst/support.py      | 2 +-
 doc/HOWTO.txt            | 6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)