Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jun 2007 17:24:14 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Garrett Cooper <youshi10@u.washington.edu>
Cc:        hackers@freebsd.org, Tim Kientzle <kientzle@freebsd.org>
Subject:   Re: Using shell commands versus C equivalents
Message-ID:  <20070617072414.GA1173@turion.vk2pj.dyndns.org>
In-Reply-To: <4674D917.7000502@u.washington.edu>
References:  <Pine.LNX.4.43.0706131018120.25469@hymn01.u.washington.edu> <46703EE9.1030804@freebsd.org> <4674B268.4030502@u.washington.edu> <4674BE32.300@freebsd.org> <4674D917.7000502@u.washington.edu>

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

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

On 2007-Jun-16 23:47:51 -0700, Garrett Cooper <youshi10@u.washington.edu> w=
rote:
> Tim Kientzle wrote:
>> The biggest time sink in pkg_add is writing each file to a temp
>> dir then copying it to its final location.  There are a couple
=2E..
>    Hmmm.. not sure if you're referring to the temp creation of files in t=
he=20
> playpen portion of the set of programs, or something else, but as I see i=
t=20
> the playpen idea is a good one because it's like the Gentoo Linux version=
 of=20
> a sandbox, and in case something goes wrong during an install or the user=
=20
> backs out, that's the way to go when dealing with a partially created /=
=20
> installed package.

For the best of both worlds, put the files into the final location (or
at least in the same FS) with a temporary name.  Once you're satisfied
that everything is OK, you can rename the files to their final names.
This is a comparatively cheap operation (as long as you aren't running
UFS without softupdates).

>    I'll definitely look into strace'ing (not really a big fan of truss(1)=
=20
> yet) the operation though, just to see how fast or slow stuff is.

ktrace can also provide timings.

--=20
Peter Jeremy

--f5QefDQHtn8hx44O
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFGdOGe/opHv/APuIcRArJrAJ9b0czHdou6h8cgtvmKDntRYy20EQCfSzXz
QuAA/QE8aKgcQZbMNMRLE5o=
=8974
-----END PGP SIGNATURE-----

--f5QefDQHtn8hx44O--



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