Date: Wed, 8 Jun 2005 19:05:58 +1000 From: Peter Jeremy <PeterJeremy@optushome.com.au> To: Giorgos Keramidas <keramida@freebsd.org> Cc: Dag-Erling Sm?rgrav <des@des.no>, freebsd-current@freebsd.org Subject: Re: you are in an fs with millions of small files Message-ID: <20050608090558.GF39114@cirb503493.alcatel.com.au> In-Reply-To: <20050608082727.GA23674@orion.daedalusnetworks.priv> References: <17059.7150.269428.448187@roam.psg.com> <42A4D5D0.9040500@elischer.org> <42A59367.6060307@centtech.com> <20050607175242.D61131@fledge.watson.org> <86ll5lmhs3.fsf@xps.des.no> <20050608074613.GA979@orion.daedalusnetworks.priv> <86zmu1l223.fsf@xps.des.no> <20050608080304.GB1226@orion.daedalusnetworks.priv> <20050608082727.GA23674@orion.daedalusnetworks.priv>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2005-Jun-08 11:27:27 +0300, Giorgos Keramidas wrote: >On 2005-06-08 11:03, Giorgos Keramidas <keramida@freebsd.org> wrote: >>> The comparison function is known at the time the directory entries are >>> read, so it should be a simple matter to read them into a red-black >>> tree instead of a singly- linked list. I'm working on a patch. >> >> Thanks :) > >This would require updates/changes to all the users of fts.h too? That would seem to depend on how public the innards of FTS and FTSENT are supposed to be. Whilst <fts.h> refers to singly linked lists and pointers to arrays, consumers are not supposed to allocate either structure themselves and only traverse the list via fts_read() or fts_children() - and only ls(1), mtree(8) and ctm_dequeue(1) use fts_children(). At first glance, it should be fairly easy to change the underlying representation from a linked list to a red-black tree without affecting the API at all. -- Peter Jeremy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050608090558.GF39114>