Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/25/2010 in all areas

  1. So when I think of file integrity I think of checksums and MD5. I realize there are tons of different hash methods and CRCs available but I prefer MD5. So I was exited when I heard LabVIEW 8.2 got MD5 for files natively (I think it was in the vi lib in 8.0 but nothing on the palette) But since I've used the MD5 I've been disappointed it how long it takes to calculate an MD5. So I did some quick tests comparing the native MD5, to the OpenG MD5, against the command line version I've been using found at http://www.etree.org/md5com.html . For small files (less than 30kb) the native MD5 is relativly quick at around 50ms for one file. This is good if you are checking the integrity of a config file, but I'd rather use it as a general purpose file utility, checking the integrity of a directory of files. Any file above 30kb and the command line version process it faster. I performed an MD5 on four 5Mb text files, and using the native MD5 it took 2,786ms, while the command line took 125ms. The OpenG wasn't a good comparison since it processed the whole file at once taking, over 30 seconds. So I wrote an "improved" MD5 calculation VI. I think you'll be horrified when you look at the source, it just uses the command line version but it works, and alot faster than either OpenG or native. I also saved it in 7.1. EDIT: I seem to have a problem uploading (says I didn't select a file) so I hosted it on my site for now. http://brian-hoover.com/Code/LabVIEW/MyMD5File.zip
    1 point
  2. QUOTE (Darren @ Jun 10 2009, 04:11 PM) I experimented with the shipping implementation, and found that the following will help the performance: Disable debugging in "MD5 Checksum File" and the sub-vi "MD5Checksum Core". Inside "MD5Checksum Core", the inner-most loop contains a section of code that performs Swap Words and Swap Bytes on the current array Element. Move these two functions to the outermost loop and place them immediately after the typecast of the string to an array of U32. I reduced the MD5 calculation on version 8.6.1f1 LabVIEW.exe from 2.79 seconds to 2.12 seconds. QUOTE (hooovahh @ Jun 10 2009, 02:57 PM) Any file above 30kb and the command line version process it faster. I performed an MD5 on four 5Mb text files, and using the native MD5 it took 2,786ms, while the command line took 125ms. The OpenG wasn't a good comparison since it processed the whole file at once taking, over 30 seconds. I revisited my .NET implementation from here and found that it one of the .NET methods was broken when I loaded the VI in LabVIEW 8.6.1. I've fixed it and cleaned it up, but can't upload to the LAVA forums at the moment. (not sure why...) Maybe the .NET technique will work for you...
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.