Re: you are in an fs with millions of small files

From: Colin Percival <cperciva_at_freebsd.org>
Date: Wed, 08 Jun 2005 00:52:17 -0700
Giorgos Keramidas wrote:
> On 2005-06-08 09:25, Dag-Erling Sm?rgrav <des_at_des.no> wrote:
>>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.
> 
> Is there a better way to sort a linked list

How do you define "better"?  You can merge-sort a singly-linked list
quite easily, but converting it to an array and back would probably
be faster.

Colin Percival
Received on Wed Jun 08 2005 - 05:52:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:36 UTC