From owner-freebsd-ports@FreeBSD.ORG Sat May 12 19:34:13 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F8A716A409 for ; Sat, 12 May 2007 19:34:13 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id F0D7E13C45B for ; Sat, 12 May 2007 19:34:12 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id C18781A3C1A; Sat, 12 May 2007 12:34:59 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 20A7E52C9B; Sat, 12 May 2007 15:34:12 -0400 (EDT) Date: Sat, 12 May 2007 15:34:12 -0400 From: Kris Kennaway To: Stephen Montgomery-Smith , Kris Kennaway , "[LoN]Kamikaze" , freebsd-ports@freebsd.org Message-ID: <20070512193411.GA25051@xor.obsecurity.org> References: <464597C6.3030406@gmx.de> <20070512174011.GA22526@xor.obsecurity.org> <4645FF71.60100@gmx.de> <20070512175824.GA23103@xor.obsecurity.org> <20070512133054.B5588@math.missouri.edu> <20070512183634.GA23819@xor.obsecurity.org> <20070512134849.D5588@math.missouri.edu> <20070512193052.GA63649@icarus.home.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070512193052.GA63649@icarus.home.lan> User-Agent: Mutt/1.4.2.2i Cc: Subject: Re: Time to abandon recursive pulling of dependencies? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2007 19:34:13 -0000 On Sat, May 12, 2007 at 12:30:52PM -0700, Jeremy Chadwick wrote: > On Sat, May 12, 2007 at 01:53:36PM -0500, Stephen Montgomery-Smith wrote: > > I believe that if this function is optimized, that practically all of the > > slowness issues we have seen with pkg_add, pkg_deinstall, etc, will be > > solved. Give me a few days. I think I will be able to make it work very > > much faster. For starters it uses a bubble sort. I can understand why they > > don't want to use a quicksort, because they want to check complete integrety > > of comparison tree (i.e. that there are no internal loops), but I recall > > seeing an algorithm due perhaps to one of or both of Hopcroft and Tarjan > > that uses a depth first search, maybe 20 years ago, that should be much > > faster, and I think I could reproduce it. > > Please don't use a bubblesort, it's incredibly inefficient. The *existing* algorithm is a bubble sort; Stephen is not proposing to replace it with one. Kris