Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 May 2003 13:42:26 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Andy Farkas <andyf@speednet.com.au>
Cc:        current@freebsd.org
Subject:   Re: man(1) oddity - was: HEADS UP: bzip2(1) compression for manpages...
Message-ID:  <20030519104226.GA17366@sunbay.com>
In-Reply-To: <20030519192357.O93323-100000@hewey.af.speednet.com.au>
References:  <20030519081817.GA1035@sunbay.com> <20030519192357.O93323-100000@hewey.af.speednet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help

--W/nzBZO5zC0uMSeA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, May 19, 2003 at 08:22:48PM +1000, Andy Farkas wrote:
> On Mon, 19 May 2003, Ruslan Ermilov wrote:
> > On Mon, May 19, 2003 at 11:01:00AM +1000, Andy Farkas wrote:
> > > On Fri, 16 May 2003, Ruslan Ermilov wrote:
> > > > On Fri, May 02, 2003 at 12:09:02PM +1000, Andy Farkas wrote:
> > > > >
> > > > > As a normal user, the "Formatting page, please wait..." message n=
ever
> > > > > appears, whereas it does for root.
> > > > >
> > > > > IMHO this is a mild POLA violation.
> > > > >
> > > > For a normal user, man(1) no longer creates the catpages.
> > > > This is still being revised (by me).
> > >
> > > It still has to format the page. A user should be told this regardles=
s if
> > > she is the superuser or not. ATM, only root gets a message.
> > >
> > Not quite. When catpages are created by man(1), the user is
> > displayed the text only after the whole catpage was created.
> > This can take some considerable time on large manpages and
> > slow machines.
>=20
> This is my point. A normal user isn't told whats happening anymore:
>=20
> $ sysctl -a | grep kern.version
> kern.version: FreeBSD 5.1-BETA #4: Sat May 17 14:23:21 EST 2003
> $
> $ find /usr/share/man/ -name "ppp.8*"
> /usr/share/man/man8/ppp.8.gz
> $
> $ /usr/bin/time man ppp > /dev/null
> ***user waits here***
>        11.57 real        11.35 user         1.26 sys
> $
> $ su -
> Password:
> #
> # /usr/bin/time man ppp > /dev/null
> Formatting page, please wait...***user waits here***Done.
>        11.75 real        11.64 user         1.23 sys
> #
>=20
> A normal user has to wait staring at a flashing cursor for 11.5 seconds
> before *anything* happens, but root is told "Formatting page, please
> wait..."
>=20
> Am I explaining it enough?
>=20
You're not being quite right here.  Just to demonstrate things,
take a 4-STABLE box, then temporary rename /usr/share/man/cat8 to
something else, and try "man 8 ppp"; you'll be presented with the
output shortly after (without any message), and much quicker than
after 11.5 seconds, as you trying to tell me.  When catpages get
created, the text is displayed only after the whole manpage was
formatted (and saved to a .cat file).  When not creating catpages,
the formatter passes the output directly to your ${PAGER}, so
while groff(1) is still formatting the manpage, you can already
view it (head of it).

> > When catpages are not created, the user is
> > displayed the text as soon as part of it becomes available
> > from the "/usr/bin/groff -S -Wall -mtty-char -man" command,
> > subject to the ${PAGER} buffering.
>=20
> If a catpage already exists, the `formatting` message does not appear
> for any user.
>=20
Sure, and we don't tell the user "Hey, wait, I'm uncompressing
the catpage for you...", though it may take some time too.

We only tell the user to wait when we're sure it may take long
time before the output is displayed, that is only when we
create the catpage.  Compare:

say "wait"		format | display
format
save
display


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--W/nzBZO5zC0uMSeA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+yLUSUkv4P6juNwoRAuA/AJ9Gk6FAOgueF2vAG3P9bw/2XeDygQCfVxIx
x5u3aYrBIPCLViwXhkpPt8M=
=P2Iy
-----END PGP SIGNATURE-----

--W/nzBZO5zC0uMSeA--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030519104226.GA17366>