From nobody@FreeBSD.ORG Mon Sep 20 20:21:59 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 6862C14CC9; Mon, 20 Sep 1999 20:21:59 -0700 (PDT)
Message-Id: <19990921032159.6862C14CC9@hub.freebsd.org>
Date: Mon, 20 Sep 1999 20:21:59 -0700 (PDT)
From: brett@lariat.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: man program saves multiple cached copies of the same file
X-Send-Pr-Version: www-1.0

>Number:         13869
>Category:       bin
>Synopsis:       man(1) program saves multiple cached copies of the same file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 21 03:30:01 PDT 1999
>Closed-Date:    Fri Nov 02 22:17:45 UTC 2012
>Last-Modified:  Fri Nov 02 22:17:45 UTC 2012
>Originator:     Brett Glass
>Release:        Several
>Organization:
>Environment:
>Description:
The "man" program doesn't recognize when multiple links exist to a file
containing a man page, and therefore creates multiple cached copies
of the formatted file. For example: /usr/share/man/man1/csh.1.gz and 
/usr/share/man/man1/fg.1.gz point to the same file. But when one 
types "man csh" and then "man fg", the file is formatted twice and
separate copies of the formatted output are created in 
/usr/share/man/cat1. This reduces the available cache space
and uses a great deal of extra cycles (groff is anything but
a lightweight utility).
>How-To-Repeat:
Type "man csh" and "man fg". Note that the same page comes up in
either case, but that the system takes time to format it twice even
though the caching mechanism should prevent this. Next, look at
/usr/share/man/cat1 and note that there are two identical files
called csh.1.gz and fg.1.gz. 
>Fix:
There are several possible fixes. The easiest may be to change the
hard links in the various man directories into symlinks, and recode
man to follow the symlinks to the one "original" file name before
formatting and displaying it.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: sheldonh 
State-Changed-When: Tue Sep 21 03:36:53 PDT 1999 
State-Changed-Why:  
There are plans to introduce an improved index management system 
into the man family. The implementation will make this a non-issue. 


Responsible-Changed-From-To: freebsd-bugs->sheldonh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Tue Sep 21 03:36:53 PDT 1999 
Responsible-Changed-Why:  
I'll come back and close this when we're done. :-) 

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: brett@lariat.org
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/13869: man program saves multiple cached copies of the same file 
Date: Tue, 21 Sep 1999 12:36:45 +0200

 On Mon, 20 Sep 1999 20:21:59 MST, brett@lariat.org wrote:
 
 > The "man" program doesn't recognize when multiple links exist to a file
 > containing a man page, and therefore creates multiple cached copies
 > of the formatted file.
 
 Yeah, but it's not a critical problem, given the size of the object
 duplication we're talking about.
 
 Mike Pritchard and I plan to teach man, whatis and friends to use a
 proper database. That'll make this a moot point.
 
 Ciao,
 Sheldon.
 

From: Brett Glass <brett@lariat.org>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: freebsd-gnats-submit@FreeBSD.ORG, bugs@FreeBSD.ORG
Subject: Re: bin/13869: man program saves multiple cached copies of the
  same file 
Date: Tue, 21 Sep 1999 09:10:00 -0600

 Good! It'll be nice to move this away from GNU software as well.
 
 The main type of wastage, under the current system, is not really
 space but programmers' and users' time. The system has to send more 
 things through groff, which is a CPU and memory hog even on our 
 fastest machines. I drum my fingers waiting for man pages to appear
 even on our new Athlon  server.
 
 What's more, the cache is filled more quickly, so man pages must
 be passed through groff more often.
 
 A better indexing system would be most welcome! Let me know if you'd
 like some help doing indexing, as I have indexed books before.
 
 --Brett
 
 At 12:36 PM 9/21/99 +0200, Sheldon Hearn wrote:
 
 
 >On Mon, 20 Sep 1999 20:21:59 MST, brett@lariat.org wrote:
 >
 > > The "man" program doesn't recognize when multiple links exist to a file
 > > containing a man page, and therefore creates multiple cached copies
 > > of the formatted file.
 >
 >Yeah, but it's not a critical problem, given the size of the object
 >duplication we're talking about.
 >
 >Mike Pritchard and I plan to teach man, whatis and friends to use a
 >proper database. That'll make this a moot point.
 >
 >Ciao,
 >Sheldon.
 
 
Responsible-Changed-From-To: sheldonh->freebsd-bugs 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Tue Nov 27 10:23:34 PST 2001 
Responsible-Changed-Why:  
I lost interest, given that this would be yet another local patch 
to consider when upgrading GNU man. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=13869 
State-Changed-From-To: suspended->patched 
State-Changed-By: arundel 
State-Changed-When: Mon Feb 14 00:05:24 UTC 2011 
State-Changed-Why:  
With the introduction of the shiny new man(1) script by gordon@, duplicates are 
no longer an issue. Once it gets MFC'ed to stable/8 and stable/7 goes EoL, we 
can finally close this ancient PR. ;) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=13869 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Fri Nov 2 22:17:45 UTC 2012 
State-Changed-Why:  
MFCed by now or it is never going to be 

http://www.freebsd.org/cgi/query-pr.cgi?pr=13869 
>Unformatted:
