From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 8 18:24:02 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84C17A67; Mon, 8 Dec 2014 18:24:02 +0000 (UTC) Received: from mail-pd0-x234.google.com (mail-pd0-x234.google.com [IPv6:2607:f8b0:400e:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A7C9CA8; Mon, 8 Dec 2014 18:24:02 +0000 (UTC) Received: by mail-pd0-f180.google.com with SMTP id w10so2498591pde.11 for ; Mon, 08 Dec 2014 10:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=xrpxhD4GgojXRU/uISXHvMM40lhraGNYYIPU1gfXYkI=; b=Mwk4N1mquubj+YulG3Cz+w53LDNkf4KdfmMxCdKLJxESp6zCTq1ewgp4/bG9CmGzNR VvE/rvYL4p1Y6yJsKZHkwwQS8I/I931bHgZFXS6KAO/UuZ7DzEcqDcIU/8Sy7I2z7cVG RWljU6B8/4atmjow08LWFLpIDkRJhrUj8ngpljGZz11AQc8cjOL7zl/BBjOb8vCXrOG9 FQJ741jdBKzeQalKzqLI6De0/aSlQb2onMOjgBoLuca6FnkmVSIJ+Dh4eXxumqCMLQo1 hJXyFzvOuE7WDD5k1bnHV3lAjHBC7SkN04tFhFCt0dgMmZWQoKqR2Pc05FoJQ4m7JEOR iZpA== X-Received: by 10.70.131.78 with SMTP id ok14mr23530820pdb.112.1418063041801; Mon, 08 Dec 2014 10:24:01 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:819d:7b8f:c98b:9d2c? ([2601:8:ab80:7d6:819d:7b8f:c98b:9d2c]) by mx.google.com with ESMTPSA id xq16sm28027433pac.31.2014.12.08.10.24.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Dec 2014 10:24:01 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_A7597229-6A59-4733-B08D-A0F633B016D3"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Reason for reordering /usr/share/misc/termcap.src for /usr/share/misc/termcap ? From: Garrett Cooper In-Reply-To: <201412081651.sB8GpbpO088722@chez.mckusick.com> Date: Mon, 8 Dec 2014 10:23:59 -0800 Message-Id: <745168FD-F296-427D-9AEB-79FD42038324@gmail.com> References: <201412081651.sB8GpbpO088722@chez.mckusick.com> To: Kirk McKusick X-Mailer: Apple Mail (2.1878.6) Cc: FreeBSD Hackers , Erik Trulsson , dickey@his.com, jkh@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2014 18:24:02 -0000 --Apple-Mail=_A7597229-6A59-4733-B08D-A0F633B016D3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Dec 8, 2014, at 8:51, Kirk McKusick wrote: >> Date: Mon, 08 Dec 2014 13:13:40 +0100 >> From: Erik Trulsson >> To: Garrett Cooper >> Cc: FreeBSD Hackers , >> Kirk McKusick , jkh@freebsd.org, >> dickey@his.com >> Subject: Re: Reason for reordering /usr/share/misc/termcap.src for = /usr/share/misc/termcap ? >> X-ASK-Info: Message Queued (2014/12/08 04:13:49) >> X-ASK-Info: Confirmed by User (2014/12/08 08:34:35) >>=20 >> Quoting Garrett Cooper : >>=20 >>> Hi all, >>> I'm trying to resolve an issue where usr.bin/vi is needed to =20 >>> preprocess share/termcap every time make buildworld is invoked on =20= >>> FreeBSD. The termcap file reordering seems to have been done since =20= >>> the BSD 4.4 Lite sources were imported into FreeBSD: =20 >>> = https://svnweb.freebsd.org/base/projects/building-blocks/share/termcap/Mak= efile?view=3Dmarkup#l15, >>> https://svnweb.freebsd.org/base?view=3Drevision&revision=3D1638. >>> I don't have history behind why this should be done (it's = unfortunate >>> because it appears to mangle the comment <-> entry mappings, and >>> ultimately this gets put into termcap.db), and I was hoping that >>> someone with additional history could fill in why this is being = done. >>> Thank you! >>=20 >> It looks like it is done to put the most common (at the time it was =20= >> written) terminal types early in the reordered termcap file. This =20= >> presumably so that programs reading termcap would be more likely to =20= >> find the entry they wanted as quickly as possible. >>=20 >> That would have been useful when termcap was just a plain text file, =20= >> but if you are using termcap.db to look up terminal capabilities then = =20 >> there doesn't seem to be much point to doing such reordering = beforehand. >=20 > I believe Erik Trulsson's answer is correct. Termcap had grown very > large and on sub-1-MIP computers took a noticable delay to read on > every startup of programs using it. So, it was reordered to reduce > the startup time on common terminals. As Erik points out this = optimization > is no longer necessary as termcap is now placed in a database. Not to > mention that there are far fewer entries in it today than there were > at the peak of its existence. Ok. I=92ll do some double-checking to see whether or not something=92s = accessing the plaintext termcap file directly, but it helps to know the = history behind this (especially when the history in the installed file = gets muddled when ex is run on the file at build time). Thanks! --Apple-Mail=_A7597229-6A59-4733-B08D-A0F633B016D3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUhey/AAoJEMZr5QU6S73eofgH/RqLchH2T9aiym3Bctx8y1I7 xOLMfcVm8hJjAiSjFkW0HDLVdWV+3uP3Y3CdI7tRF6oRKETMjRfS5/vykQHN0MkU 1SRwiNtpczPb+j25zkjHcJQW9Zi0NPJpTHzjqJ4FLJU90Uat3XyN4CjZlBXI3lBI kLb+cbYGbnJ7LvaXcDIDvMi62+WpI4Ct9+qNWfH8om611p7YNx9zEizbegabkzaL EgkTRKtQAFDXkzQf77puip3xW96XTNVuX7uFXu2/SwN/C7whuPegREdcvdCmmwen 2TfJYvCK+SP5++4+ndqYC+RSG8SHcj/iLTngCG+DTfMCFsGeeMbn9+kVDDuj5gg= =fjKD -----END PGP SIGNATURE----- --Apple-Mail=_A7597229-6A59-4733-B08D-A0F633B016D3--