I made the folder I was trying to list PUBLIC so no login is required.
Hence not need to use SMB.SetCredentials
Then SMB is very fast..
So I would assume that as I thought in my original post that SMB does actually login each time it does a directory listing etc
I assume this is NOT necessary.... could the SMB library be changed to have a login that is remembered and so once logged in then operations proceed quickly.
I am calling ListFiles once only ... however my files have a deep nested directory structure. So many layers to get down to maybe what I want which means many calls to ListFiles.
The speed is OK when it is PUBLIC share. I am SURE (feel) that the SMB library is logging in i.e. send credentials each time a ListFiles is called.
SMB needs (IMHO) a Connect and Disconnect method so that once connected one stays connected and can keep delving into sub layers of directory structure.
The CONNECT would send credentials just the once ...
Could even have an IsConnected property to test ...
Is it possible to check the library as to whether credentials are sent each time a ListFiles is requested.