10-26-2006 09:18 AM
10-26-2006 09:38 AM
Kenny
I usually upload data to a database and then usen SQL for this sort of thing. Its makes my life much easier and faster than trying to code my own sorting and parsing algorithms.
I usually use LabSQL and MS Access. NI have the Database Connectivity Toolkit which I own but prefer LabSQL. Reading the forums it looks as if I should make a move to mySQL from but not had time to do that yet.
Just my £0.02
David
10-26-2006 10:38 AM - edited 10-26-2006 10:38 AM
Hello Kenny,
first thing: on my machine it took just about 4 seconds to complete the job for a txt-file with 17 MB in size and roughly 600,000 lines (apart from reading in the file that is...)
I tried to exchange the multiple indexing of arrays by putting the three components of one line into one single string by converting the 1D-array into a string - I had no luck with it, since the conversion takes longer than the 3 instances of indexing the 1D-Array.
The subsequent use of Match Pattern ("sort for day in month" only) is obsolete though - wire the remaining substring after the first match of "/" (before the double CASE-structure)directly to one more Match Pattern. That is about all I figured out for performance tuning...sorry
find my modifications attached for your convenience.
You will have to reconnect the month and day controls to your TypeDefs and reconnect the DataIn Control to the FOR-loop...
Sorry - VIs are in 8.2...
Message Edited by comrade on 10-26-2006 10:38 AM
10-26-2006 11:29 AM - edited 10-26-2006 11:29 AM
Below is an image of one possible code alternative that addresses some of these points.

Message Edited by altenbach on 10-26-2006 09:32 AM