From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 14 18:36:40 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F8EA16A400 for ; Wed, 14 Feb 2007 18:36:40 +0000 (UTC) (envelope-from zombyfork@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.230]) by mx1.freebsd.org (Postfix) with ESMTP id D5DC113C474 for ; Wed, 14 Feb 2007 18:36:39 +0000 (UTC) (envelope-from zombyfork@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so297511nzh for ; Wed, 14 Feb 2007 10:36:39 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=lWARTWJD+6euvxtQ2+9ZfFSa0YT8MoXXnTSBQohicaC5MPJAQhwyMziALxeEisPcdL5ajolFpJTzNIDwWxqMua6/M8s692YDIPd3lUwOkjH9S8mgS67fk0UAmoE7WdID0G8L0QRw3tChKMGniQ+yF7k4aXEiefg/blFoRyNXJ9M= Received: by 10.65.23.7 with SMTP id a7mr1242953qbj.1171478199273; Wed, 14 Feb 2007 10:36:39 -0800 (PST) Received: by 10.49.63.7 with HTTP; Wed, 14 Feb 2007 10:36:39 -0800 (PST) Message-ID: <346a80220702141036j29485688gf052be8f4432eed5@mail.gmail.com> Date: Wed, 14 Feb 2007 11:36:39 -0700 From: "Coleman Kane" To: "John Nielsen" In-Reply-To: <200702141255.53501.lists@jnielsen.net> MIME-Version: 1.0 References: <17875.18893.789217.224987@canoe.dclg.ca> <200702141255.53501.lists@jnielsen.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, David Gilbert Subject: Re: portupgrade O(n^m)? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cokane@cokane.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2007 18:36:40 -0000 On 2/14/07, John Nielsen wrote: > > On Wednesday 14 February 2007 12:41, David Gilbert wrote: > > I have 734 ports installed on my laptop right now. I'm pretty sure, > > at times, I've had over 1000 ports on my laptop. > > > > On machine with moderate numbers of ports (most servers seem to have > > 50 to 200 ports), portupgrade takes a moderate amount of time to start > > work. On machines like my laptop, portupgrade seems to take much more > > time to run. I assume it's solving the dependency graph before it > > decides what to upgrade first, but is this truly a O(n^2) problem? It > > seems like the implemented algorithm is O(n^2). > > Just a "me too". I noticed a huge increase in time for portupgrade when I > started using the modular Xorg ports tree and upgraded to X.org 7.2RC. The > number of installed ports on my machine went from just over 300 to well > over > 600 as a result of the upgrade. Specifying small numbers of ports (without > globbing) to portupgrade doesn't seem to take much more time, > but "portupgrade -a" or anything similar takes forever now. If there is an > optimization to be made there it would be good to do it before modular > xorg > hits the official tree. > > JN I've also had this problem. I have found that if I perform a "portsdb -U && pkgdb -F" every time following a cvsup that portupgrade doesn't try to go through the full ports indexing steps again. It is still slow, and any improvement that can be made should be. It is already a significant enough pain that most ports build in a shorter amount of time than it takes portupgrade to update its database. -- Coleman Kane