]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-windows-optimize-smb-dir-search-if-no-wildcard-20061217
authorAsanka Herath <asanka@secure-endpoints.com>
Sun, 17 Dec 2006 21:07:22 +0000 (21:07 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 17 Dec 2006 21:07:22 +0000 (21:07 +0000)
commitcf947bfcc1f6cce3a9f0f4d5b1cc457352583b99
treedf9ed240c565b4484408cc06d73f9c9764710dcb
parent2b1d85b592d731a52248dd934cf52bf736a6c09f
DEVEL15-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.

(cherry picked from commit a57531592bfab0b36a4d7fb58b556b848e6f75c8)
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