[snip uberslow network traverse] > > I don't know if there is a reasonable way to speed this up, > because you want to ensure that //machine exists before > allowing `cd //machine' to succeed, but don't want to go > stat'ing every machine on the network when doing a readdir() on //. >
I can think of one way: go to a "thread pool" sort of arrangement where you spawn off a thread to wait for the (non-)responses from network PCs in parallel. This would reduce the worst-case traverse time from O(Ttimeout) to O(Ttimeout/Nsize-of-threapool). Of course, this would require massive changes to ls, and would unnecessarily slow down and increase resource usage of the most common use case of ls, namely getting a simple directory listing of files on a local disk. -- Gary R. Van Sickle -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/