[Haskell-cafe] How to optimize a directory scanning?
Brandon Allbery
allbery.b at gmail.com
Sat May 11 22:27:13 UTC 2019
Depends on the host filesystem. Traditionally, the first 10 blocks are
direct and often (but not always, if the fs is fragmented) consecutive; the
remainder are indirect by 1-3 levels (not that you ever want a directory to
be double indirect much less triple!), and often are not consecutive simply
because by the time you get to that point you're working with a filesystem
with a lot of files on it and a fair amount of fragmentation.
On Sat, May 11, 2019 at 6:24 PM KC <kc1956 at gmail.com> wrote:
> Thank you for making the `posix-paths` package for fast directory
> traversals:
>
> Are directories stored in consecutive disk blocks?
>
> On Fri, May 10, 2019 at 6:53 PM Niklas Hambüchen <mail at nh2.me> wrote:
>
>> Hi,
>>
>> we made the `posix-paths` package for fast directory traversals:
>>
>> https://hackage.haskell.org/package/posix-paths
>>
>> You can find benchmarks in
>>
>> https://github.com/JohnLato/posix-paths#benchmarks
>>
>> Some more tips (some of them you're already following as per other
>> threads):
>>
>> * Use `time` to if time is spent on kernel CPU, userspace CPU, or waiting
>> * Use `strace -fy` with `-ttt` and `-T` to see timings, and `-c` and
>> `-wc` summary statistics
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>> Only members subscribed via the mailman list are allowed to post.
>
>
>
> --
>
> --
>
> Sent from an expensive device which will be obsolete in a few months! :D
> Casey
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
--
brandon s allbery kf8nh
allbery.b at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190511/365ef822/attachment.html>
More information about the Haskell-Cafe
mailing list