From owner-freebsd-toolchain@FreeBSD.ORG Tue Nov 8 21:43:07 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B05B106566B; Tue, 8 Nov 2011 21:43:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0F6F58FC0A; Tue, 8 Nov 2011 21:43:07 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:e5f2:b2e3:287d:70bb] (unknown [IPv6:2001:7b8:3a7:0:e5f2:b2e3:287d:70bb]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4FD405C59; Tue, 8 Nov 2011 22:43:06 +0100 (CET) Message-ID: <4EB9A268.5020805@FreeBSD.org> Date: Tue, 08 Nov 2011 22:43:04 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111031 Thunderbird/8.0 MIME-Version: 1.0 To: Alexander Best References: <20111108204912.GA34155@freebsd.org> In-Reply-To: <20111108204912.GA34155@freebsd.org> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-toolchain@freebsd.org Subject: Re: make cleanworld X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2011 21:43:07 -0000 On 2011-11-08 21:49, Alexander Best wrote: > any reason 'make cleanworld' does > > otaku% make cleanworld > rm -rf /usr/obj/usr/git-freebsd-head/* > chflags -R 0 /usr/obj/usr/git-freebsd-head > rm -rf /usr/obj/usr/git-freebsd-head/* > > where > > otaku% make cleanworld > chflags -R 0 /usr/obj/usr/git-freebsd-head > rm -rf /usr/obj/usr/git-freebsd-head/* > > should be sufficient? The first method is more efficient, because there are usually just a few files with schg flags set on them (zero even, if you build as a regular user). Suppose you have 30,000 files in /usr/obj, of which 20 have schg flags. The first method will unlink 29,980 files, failing on 20 of them. Then it will change flags on just 20 files, and lastly unlink those 20 files. Total number of 'operations' is 30,000 + 20 + 20 = 30,040. The second method will change flags on all 30,000 files, then unlink all 30,000 files. Total number of 'operations' is now 30,000 + 30,000 = 60,000.