
A modest sized dataset, a text file of about 30,000 lines, formatted with fixed fields (no tabs).
Want to read it into a datagrid to enable fast finds, sorting by different columns, etc.
I can read the file into a variable (even pulling it from a webserver) very quickly indeed.
Once loaded into the datagrid, sorts / finds are blindingly fast.
But oh, loading that datagrid... That takes close to 2 minutes on a Macbook Pro with a 2.9ghz i7. Huh? I did repeat through the variable I wrote the file to, and I used a variable as an index to identify what line I was working on. I used the substring syntax to pull each field out of each line (chunk) and put it into an array, then assigned the array to the datagrid.
Besides being slow, LC was locked up during the load process. I guess that messages were locked out. So... Advice on this? Using a database on a server is not an option here, and it will eventually need to run on an iPad.
Advice, suggestions, and even laughs are quite welcome!
Paul
P.S. I can post the code later if you wish, but is is pretty much straight out of the online lessons, with jUst a few changes to deal with a fixed format data file. Fields are padded by spaces in the file. I am on an iPad or I woukd have posted it first thing.
