Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Jun 2005 09:25:48 +0200
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Randy Bush <randy@psg.com>, freebsd-fs@freebsd.org, FreeBSD Current <freebsd-current@freebsd.org>, Eric Anderson <anderson@centtech.com>, Julian Elischer <julian@elischer.org>
Subject:   Re: you are in an fs with millions of small files
Message-ID:  <86ll5lmhs3.fsf@xps.des.no>
In-Reply-To: <20050607175242.D61131@fledge.watson.org> (Robert Watson's message of "Tue, 7 Jun 2005 17:57:02 %2B0100 (BST)")
References:  <17059.7150.269428.448187@roam.psg.com> <42A4D5D0.9040500@elischer.org> <42A59367.6060307@centtech.com> <20050607175242.D61131@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson <rwatson@FreeBSD.org> writes:
> - Some appliations behave poorly with large trees.  ls(1) is the classic
>    example -- sorting 150,000 strings is expensive, and should be avoided.

That's because fts's sorting code is brain-dead.  It starts by reading
the entire directory into a linked list, then copies that list into an
array which it passes to qsort(), and finally converts the array back
into a linked list.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ll5lmhs3.fsf>