Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2008 11:26:12 +0200
From:      Pav Lucistnik <pav@FreeBSD.org>
To:        soralx@cydem.org
Cc:        rdivacky@FreeBSD.org, freebsd-ports@FreeBSD.org
Subject:   Re: [patch] pkg_delete(1) speedup
Message-ID:  <1206955572.25210.19.camel@pav.hide.vol.cz>
In-Reply-To: <20080330234946.7fec88bf@soralx>
References:  <1206548309.78560.69.camel@pav.hide.vol.cz> <20080326201416.GA34807@freebsd.org> <20080330234946.7fec88bf@soralx>

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

--=-ZbztYNoCVo3w6yny/NW8
Content-Type: text/plain; charset=ISO8859-2
Content-Transfer-Encoding: quoted-printable

soralx@cydem.org p=ED=B9e v ne 30. 03. 2008 v 23:49 -0700:

> Notice pkg_info in ^T output during "Checking if x11/rxvt-unicode already
> installed" phase. This one takes awhile. The actual command is:
> `/usr/sbin/pkg_info -q -O x11/rxvt-unicode`
>  real    0m37.697s
>  user    0m0.125s
>  sys     0m0.360s
>=20
> find_pkgs_by_origin() in info/perform.c uses the same matchbyorigin()
> in lib/match.c. What's interesting here, however, is that simple
> `time grep ORIGIN /var/db/pkg/*/+CONTENTS` takes ~7 sec (XXX re-test on
> that same notebook XXX), while find_pkgs_by_origin() incarnation of
> practically the same functionality takes over 30 sec.

Possibly the overhead from plist_cmd()/read_plist() functions.
It seems to "interpret" the whole +CONTENTS file instead of just looking
for "ORIGIN" string.

> BTW, I have a feeling that the "Registering installation" should be made
> more verbose. It takes more time that anything else now, and one's left
> to wonder what exactly is going on (seems like quite a few different
> things).

See pkg-dep target in bsd.port.mk. I bet the biggest timeslice goes into
that "for dep" loop.

> Also, I found that during the "Checking if <*> already installed" step,
> 'mtree' (XXX find out exact command here XXX) is called (from bsd.port.mk=
?),
> which can be skipped by setting NO_MTREE. What effect does [not] calling
> mtree have?

It's actually install-mtree target, which happen to be silent.
It creates a tree of directories that are assumed to exist
(like /usr/local/bin, /usr/local/lib, ...). If you skip it, some ports
may fail to install because those directories are not present.

--=20
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

The Novice rogue. A rather shifty individual

--=-ZbztYNoCVo3w6yny/NW8
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
	=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
	=?ISO-8859-1?Q?_zpr=E1vy?=

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

iEYEABECAAYFAkfwrjQACgkQntdYP8FOsoLKPQCdGPfjqQwQDqnPieWVAgQxosfZ
A5wAoJGnuP9iWTr7U0+B0jFOiu0Lx0io
=OTaV
-----END PGP SIGNATURE-----

--=-ZbztYNoCVo3w6yny/NW8--



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