From owner-freebsd-bugs Fri Aug 30 17:30:17 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95A8C37B401 for ; Fri, 30 Aug 2002 17:30:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 125EA43E42 for ; Fri, 30 Aug 2002 17:30:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7V0U3JU069967 for ; Fri, 30 Aug 2002 17:30:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7V0U3oO069966; Fri, 30 Aug 2002 17:30:03 -0700 (PDT) Date: Fri, 30 Aug 2002 17:30:03 -0700 (PDT) Message-Id: <200208310030.g7V0U3oO069966@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mike Harding Subject: Re: misc/42167: du uses linear search for duplicate inodes - very slow! Reply-To: Mike Harding Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/42167; it has been noted by GNATS. From: Mike Harding To: freebsd-gnats-submit@FreeBSD.org, mvh@ix.netcom.com Cc: Subject: Re: misc/42167: du uses linear search for duplicate inodes - very slow! Date: Fri, 30 Aug 2002 17:29:18 -0700 Here's a patch file which uses 256 lists rather than one - it doesn't slow down nearly as fast... begin 644 du.c M26YD97@Z(&1U+F,*/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/0I20U,@9FEL93H@ M+W5S&9I;&5S("8F("AF:6QEPHA(`ES=&%T:6,@240@*BIF:6QE%T["BL@"6UA>&9I;&5S M(#T@)FUA>&9I;&5S:%MI;F1E>%T["BL@"6YF:6QE