From owner-freebsd-current@FreeBSD.ORG Thu Sep 22 20:12:45 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C39816A41F for ; Thu, 22 Sep 2005 20:12:45 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id D03BF43D46 for ; Thu, 22 Sep 2005 20:12:44 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/8.12.11/smtpout02/MantshX 4.0) with ESMTP id j8MKCSTO012117; Thu, 22 Sep 2005 13:12:29 -0700 (PDT) Received: from [10.1.1.209] (nfw2.codefab.com [199.103.21.225] (may be forged)) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id j8MKCQ9d022587; Thu, 22 Sep 2005 13:12:28 -0700 (PDT) In-Reply-To: <20050922182104.GC990@galgenberg.net> References: <200509220446.j8M4kBPA019823@blue.virtual-estates.net> <20050922182104.GC990@galgenberg.net> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Thu, 22 Sep 2005 16:12:24 -0400 To: Ulrich Spoerlein X-Mailer: Apple Mail (2.734) Cc: "Mikhail T." , current@freebsd.org Subject: Re: using bzip2 to compress man-pages X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2005 20:12:45 -0000 On Sep 22, 2005, at 2:21 PM, Ulrich Spoerlein wrote: > On Thu, 22.09.2005 at 00:46:11 -0400, Mikhail T. wrote: >> Hello! >> >> How can I attract an interested comitter to my: >> >> http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/79607 > > Changing the default format for manpages has serious bikeshed > potential. > While adding support for reading/writing bz2 compressed manpages is > certainly useful, I doubt the benefit of switching to bzip2 compressed > manpages. > > There are several points to consider: > > 1. I dont want to wait for my manpages to display, they have to be on > screen instantanously. Running "catman" first and saving the "neqn $* | tbl | nroff -man | col" output would probably make a lot more difference compared to the cost of running gzcat versus bzcat. :-) > 2. "Desktops" and "Servers" have several GBs of space. No need to > further squeeze the manpages (heck, I'd even consider not compressing > them at all, but slight compression should even be faster than no > compression at all) This is a more interesting point. Unless compressing the manpage nroff sources or a preformatted cat page actually compresses well enough that the file uses fewer disk sectors, doing compression isn't useful. Likewise, unless compressing the manpage with bzip2 rather than gzip saves enough data to gain a sector, the switchover would not be useful. From what it looks like, the average manpage is about 2000 bytes uncompressed, or about 1K compressed with gzip. Consider the results of: du -a /usr/share/man/man* | sort -n >! /tmp/manpage_sizes for f in `fgrep .gz /tmp/manpage_sizes | awk '{print $2}'` do wc -c $f && gzcat $f | bzip2 --best | wc -c done My guess is that roughly 95% of the manpages aren't going to save a disk sector by switching. -- -Chuck