]> git.michaelhowe.org Git - packages/o/openafs.git/commit
windows-optimize-smb-dir-search-if-no-wildcard-20061217
authorAsanka Herath <asanka@secure-endpoints.com>
Sun, 17 Dec 2006 21:05:28 +0000 (21:05 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 17 Dec 2006 21:05:28 +0000 (21:05 +0000)
commita57531592bfab0b36a4d7fb58b556b848e6f75c8
tree75e15b79ff647d61050c8a3242204985fa6fa6bf
parent5b56a0b8ebbdfffa46b90d45b06253c3c6fade15
windows-optimize-smb-dir-search-if-no-wildcard-20061217

When performing a SMB FindFirst/FindNext/FindClose operation if there
are no wildcards involved, we can optimize the case and turn it from
O(n) to O(1) where 'n' is the number of entries in the directory.
This can be done by performing a cm_Lookup() and if it succeeds,
constructing the appropriate response instead of parsing the contents
of each buffer associated with the directory looking for matches.

Without this optimization, FindFirst operations on directories containing
thousands of entries can take a large number of seconds to complete.
src/WINNT/afsd/cm_conn.c
src/WINNT/afsd/cm_conn.h
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsd/cm_vnodeops.h
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c