Faster Filesystem Scan in C#
Posted: Tue Mar 10, 2009 3:14 am
Hi All,
I've got a bit of a self-assigned project at work and just wonder if anyone has any ideas about this.
We are an Optometry practice and get replies to referral letters sent through from GP surgeries. When a letter arrives, it gets scanned and the original document will eventually be shredded. The scanned images are stored as JPEG's on our (extremely under-powered) file server. I've made a little program for our client PC's in the consulting rooms. These allow the files to be viewed and searched for by patient name, id or date received. The information is displayed in a way that our receptionists find a lot easier than doing a file search through Windows.
My main problem is the file scanning speed. To build my list of files, I use System.IO.Directory.GetFiles(). On the server itself, this happens reasonably quickly, but on the clients it is painfully slow. There are currently about 2500 files, but this will soon expand. Already, all our computers have Windows Search installed, and the server location is indexed from each machine. I also already use a background worker thread to do the actual scanning (which displays it's progress discretely on the main form's status bar).
Any ideas how I can speed up the scanning process? Any thoughts much appreciated.
Cheers,
Adam
I've got a bit of a self-assigned project at work and just wonder if anyone has any ideas about this.
We are an Optometry practice and get replies to referral letters sent through from GP surgeries. When a letter arrives, it gets scanned and the original document will eventually be shredded. The scanned images are stored as JPEG's on our (extremely under-powered) file server. I've made a little program for our client PC's in the consulting rooms. These allow the files to be viewed and searched for by patient name, id or date received. The information is displayed in a way that our receptionists find a lot easier than doing a file search through Windows.
My main problem is the file scanning speed. To build my list of files, I use System.IO.Directory.GetFiles(). On the server itself, this happens reasonably quickly, but on the clients it is painfully slow. There are currently about 2500 files, but this will soon expand. Already, all our computers have Windows Search installed, and the server location is indexed from each machine. I also already use a background worker thread to do the actual scanning (which displays it's progress discretely on the main form's status bar).
Any ideas how I can speed up the scanning process? Any thoughts much appreciated.
Cheers,
Adam