For performance testing I took the 7 files listed in the chapter Introduction and opened each file while timing the time taken to populate the hash of arrays from a file in memory. I repeated this action 10 times for each file and calculated the average time taken.
The specifications of the machine carrying out these tests are shown below.
HP Pavilion tx1000 Notebook PC
Dual Processor AMD Turion(tm) 64 X2 Mobile Technology TL-50
2 x DIMM 667 MHz 512M RAM
The files used for testing were all standard CSV files from a real world office environment. The files used were of a non-sensitive nature and contained only information which is publicly available.
Test Case : File with 0 lines and file size of 0K Result : Informed user of bad file Test Case : File with 500 lines and file size of 48K Result : Average time taken over 10 runs was 0.142 seconds Test Case : File with 1000 lines and file size of 91K Result : Average time taken over 10 runs was 0.279 seconds Test Case : File with 10000 lines and file size of 901K Result : Average time taken over 10 runs was 1.479 seconds Test Case : File with 50000 lines and file size of 4.4M Result : Average time taken over 10 runs was 7.178 seconds Test Case : File with 100000 lines and file size of 8.8M Result : Average time taken over 10 runs was 13.915 seconds Test Case : File with 500000 lines and file size of 44M Result : Average time taken over 10 runs was 69.810 seconds
Overall the performance testing seemed quite good. The testing showed a definite initial delay on reading a file when the file size becomes too large, however after the file has been placed into the hash any later accessing or searching is almost instantaneous.