From owner-freebsd-ports@freebsd.org Wed Oct 28 05:33:42 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F29C2A200B8 for ; Wed, 28 Oct 2015 05:33:42 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E1F2718E1 for ; Wed, 28 Oct 2015 05:33:42 +0000 (UTC) (envelope-from soralx@cydem.org) Received: by mailman.ysv.freebsd.org (Postfix) id DDCE0A200B7; Wed, 28 Oct 2015 05:33:42 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD668A200B6 for ; Wed, 28 Oct 2015 05:33:42 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from smtp.triumf.ca (smtp.triumf.ca [142.90.100.188]) by mx1.freebsd.org (Postfix) with ESMTP id CD74C18E0 for ; Wed, 28 Oct 2015 05:33:42 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from sol (mscad14.triumf.ca [142.90.115.36]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.triumf.ca (Postfix) with ESMTP id B72B2F808 for ; Tue, 27 Oct 2015 22:05:50 -0700 (PDT) Date: Tue, 27 Oct 2015 22:05:49 -0700 From: To: Subject: Speedup ports install Message-ID: <20151027220549.2bb7a660@sol> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd9.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 05:33:43 -0000 Howdy! I have a suggestion: to significantly speedup the packaging phase when installing ports, pass '-f tgz' flag to `pkg create`: --- Mk/bsd.commands.mk (revision 400371) +++ Mk/bsd.commands.mk (working copy) @@ -126,7 +126,7 @@ PKG_DELETE?= ${PKG_BIN} delete -y PKG_INFO?= ${PKG_BIN} info -g PKG_VERSION?= ${PKG_BIN} version -PKG_CREATE?= ${PKG_BIN} create +PKG_CREATE?= ${PKG_BIN} create -f tgz PKG_ADD?= ${PKG_BIN} add PKG_QUERY?= ${PKG_BIN} query This way, gzip will be used instead of default xz (which is very slow). The extra compression of xz is not needed, as the package file will be deleted shortly anyway. Same idea applies to portmaster. Change pkg_create="pkg create " to pkg_create="pkg create -f tgz " on line 1916 of 'portmaster' script. Ports install a lot faster this way, even on a machine with a fast CPU (especially noticeable when doing portupgrade with lots of small ports). Example. [root@soralx /usr/ports/science/paraview]# time make package With xz: ===> Building package for paraview-4.3.1_1 real 1m41.120s user 1m40.070s sys 0m1.089s With gzip: ===> Building package for paraview-4.3.1_1 real 0m15.931s user 0m15.010s sys 0m0.925s Note that `make package` will still produce xz-compressed file after the flag is added to "PKG_CREATE"; I changed the behaviour only for this example, to demonstrate the time difference (factor of ~6.7). -- [SorAlx] ridin' VN2000 Classic LT