Skip to content
Snippets Groups Projects
Commit dabe97f9 authored by Yorhel's avatar Yorhel
Browse files

Use hash table when detecting hard links

This should be a *significant* performance increase when scanning a
directory that has many hard links.

I used the khash library written by Attractive Chaos[1]. This library
fits perfectly into ncdu's "use as little memory as possible but still
try to be very fast"-policy. It's API is somewhat quircky in use, but I
guess that is to blame to the lack of generic programming support in C.

Blog: http://attractivechaos.wordpress.com/
Lib: https://github.com/attractivechaos/klib/blob/master/khash.h
parent 00bd015d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment