<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 11, 2019 at 6:24 PM KC <<a href="mailto:kc1956@gmail.com">kc1956@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Thank you for making the `posix-paths` package for fast directory traversals:<br></div><div dir="ltr"><br></div><div>Are directories stored in consecutive disk blocks?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 10, 2019 at 6:53 PM Niklas Hambüchen <<a href="mailto:mail@nh2.me" target="_blank">mail@nh2.me</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
we made the `posix-paths` package for fast directory traversals:<br>
<br>
    <a href="https://hackage.haskell.org/package/posix-paths" rel="noreferrer" target="_blank">https://hackage.haskell.org/package/posix-paths</a><br>
<br>
You can find benchmarks in<br>
<br>
    <a href="https://github.com/JohnLato/posix-paths#benchmarks" rel="noreferrer" target="_blank">https://github.com/JohnLato/posix-paths#benchmarks</a><br>
<br>
Some more tips (some of them you're already following as per other threads):<br>
<br>
* Use `time` to if time is spent on kernel CPU, userspace CPU, or waiting<br>
* Use `strace -fy` with `-ttt` and `-T` to see timings, and `-c` and `-wc` summary statistics<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_549095432742689303gmail_signature"><div dir="ltr"><p dir="ltr">--<br>
</p><p dir="ltr">Sent from an expensive device which will be obsolete in a few months! :D</p>
Casey<br><br></div></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>