(attached full text and VBA code)
I don’t get it. I’m brilliant, but not that brilliant.
Why is my Word/VBA-written search faster than Microsoft’s by a factor of about 45?
Attached is a very stripped-down version of a humungous search and move/copy tool I’ve written for a client. I’m testing the full version by making backups & archives across my network.
A second client, with 5,000 English-language and 1,700 French language documents requests a service, and I use my first client’s tool to search for second client’s documents.
I perform the tests both in Windows Explorer and using my stripped-down tool (“Findr“).
English | French | |
Folders | 164 | 151 |
Files | 5,034 | 1,760 |
MBytes | 222 | 40 |
Explorer run time | 17m 0s | 7m 15s |
Explorer finds | 300 | 6 |
Findr run time | 0m 28s | 0m 8s |
Findr finds | 442 | 10 |
I find more files with “Temperature” because I force strings into upper-case, and hence some accented characters become un-accented and are available to me. (A bonus when I’m asked to strip “Detail” and “Garantie” from files).
The document sets are regular documents, all Word 2000 *.doc, no graphics, no tables, ranging in size from 21KB to 34KB.
I play no games while I’m running the Explorer job, no anti-virus running in the background, no Internet browsing, no LAN activity (e.g. backups). I run a check disk and defrag weekly; my disks are clean and rebooted.
I know that Microsoft software can be appalling, but I’m having trouble explaining how it can be this bad.