[PATCH] Only walk a directory once in vfs dirsort module
asn at samba.org
Thu Feb 9 17:06:03 UTC 2017
currently in the dirsort module we walk a directory twice. First to count the
file and allocate memory and then to fill it.
I created a patch to only walk it once. I have a customer who walks ~200k
files. I optimized it to need not to much memory, so I don't double the memory
allocation. For 200k files you need ~56MB. If the memory is out at 55 and we
doulbe it, we would allocate 110 MB for a few more files.
The speed up is big enough to have a few more memory alloctation but don't use
too much memory.
Review and push appreciated.
Andreas Schneider GPG-ID: CC014E3D
Samba Team asn at samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3203 bytes
Desc: not available
More information about the samba-technical