From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RUHj4-0001fn-Kn for garchives@archives.gentoo.org; Sat, 26 Nov 2011 12:51:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7EC9121C091; Sat, 26 Nov 2011 12:51:17 +0000 (UTC) Received: from mail-yw0-f53.google.com (mail-yw0-f53.google.com [209.85.213.53]) by pigeon.gentoo.org (Postfix) with ESMTP id DAD2B21C045; Sat, 26 Nov 2011 12:50:49 +0000 (UTC) Received: by ywm19 with SMTP id 19so3831332ywm.40 for ; Sat, 26 Nov 2011 04:50:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Eyf6CxImC+a456tgVXwLpfisvcl9vQdFuWJDMFYqhcA=; b=xTpopZsCOPZy2rR33EDMmd/l25F6IiGa0aQX98VNoUvunulHJceiK0szoKBQdrpQMD 8Q+ikaE5l0d9CNnevEBrKr/7egYgNYQTrdvsRPQ0Krg9TG25GCg2vwdM/U8cixzUzHmH Us9TUnBSnkckwP4sXHCGDm0yoTB1ITPdKTLyk= Received: by 10.182.2.225 with SMTP id 1mr11058995obx.30.1322311849345; Sat, 26 Nov 2011 04:50:49 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Sender: nirbheek.chauhan@gmail.com Received: by 10.182.150.3 with HTTP; Sat, 26 Nov 2011 04:50:27 -0800 (PST) In-Reply-To: <20111126113830.GC37825@gentoo.org> References: <1d4ac47c28706094230cb2c4e6ee1c1c71629aa0.arfrever@gentoo> <20111126105822.GA37825@gentoo.org> <20111126113830.GC37825@gentoo.org> From: Nirbheek Chauhan Date: Sat, 26 Nov 2011 18:20:27 +0530 X-Google-Sender-Auth: -NuGNPiO7-UPPmPKM1TrVWcodBY Message-ID: Subject: [gentoo-dev] Re: proj/portage:master commit in: pym/portage/dbapi/ To: Fabian Groffen Cc: gentoo-portage-dev@lists.gentoo.org, Gentoo Dev Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: e7f857a3-824c-4f60-a06f-d4e5939fd20b X-Archives-Hash: 921325baa464d328b77fea1bf8b213c5 On Sat, Nov 26, 2011 at 5:08 PM, Fabian Groffen wrote: > On 26-11-2011 16:56:41 +0530, Nirbheek Chauhan wrote: >> [...] Besides, sorting even 30,000 >> entries (if you're merging every ebuild in portage) should not take >> more than a few secs. > > A linux kernel has around that much of files, and I really wonder if > it's worth waiting a couple of seconds (probably more on sparc and arm > systems) just because then the files are in sorted order. > I'm not sure the two are really comparable. However, looking at a simple string sort on 30,000 strings, I don't see it taking a significant amount of time at all: import random import time t1 = time.time() a = range(100000, 130000) random.shuffle(a) b = [str(i) for i in a] t2 = time.time() b.sort() t3 = time.time() print(t2-t1) print(t3-t2) ---- 0.0682320594788 0.0464689731598 >> 1. I'm obviously assuming that dep nodes that do not depend on each >> other would be sorted > > I think this is per package. > Actually, reading the code it seems that it's about the file merge order of a single package. My participation in this entire discussion is m00t. Never mind. :p -- ~Nirbheek Chauhan Gentoo GNOME+Mozilla Team