03-25-2009 12:54 AM - edited 03-25-2009 12:55 AM
While developing and profiling a batch data-analysis program, I found that the "Read From Spreadsheet File.vi" function was where the majority ofthe execution time was spent. Digging further, I found the time was spent in the "Spreadsheet String To Array" function. Obviously I cannot look inside this function, but I wondered if I can somehow speed it up. Attached is a Vi that illustrates what I came up with as an alternative.
Basically using "Spreadsheet String To Array" only to split it up to a 2D String Array, and then "Fract/Exp String to Number" to convert the strings to numbers.
It consistently runs in just over 60% of the time of using Spreadsheet String To Array on it's own to do the conversion.
I am curious as to why using the two functions is quicker than just the one on it's own? Perhaps NI can improve the internals a bit? Or perhaps it is not a fair comparison?
Labview 8.6f1 Win XP SP2
03-25-2009 01:29 AM
03-26-2009 01:35 PM
02-01-2011 10:05 AM
FYI: This behavior is still there in LabVIEW 2010.
02-01-2011 01:11 PM
Adding a couple of other conversions to test against i noticed that:
1. Scan from string through a double loop was the slowest
2. Scan Value was slightly faster
3. Direct conversion through Spreadsheet to array as in OP
4. 2-step convert through Fract/Exp.
Could it be that Spreadsheet to array uses Scan Value internally?
/Y
02-02-2011 05:48 PM
Hello Yamaeda,
Would you be willing to post your code here? I would like to take a closer look and inform our R&D department if necessary.
Lynn