I've been working to make my program run more efficiently and I found running with Grids is highly inefficient. The solution I found is turning a file into a giant string and reduce it down by line then handling each line. After a crash course in LUA, I came up with this partially stolen from not sure where and some of my own logic, solution. I'm dropping this here along with the logic behind it.. hope this may be of some help to someone. By the way I'm that annoying guy that doesn't use tabs.. in fact I even remove them!
Code:
string = TextFile.ReadToString("AutoPlay\\Data\\Data.csv"); --Loading File to String local Table = {}; for line in string.gmatch(string, '([^\r\n]+)' ) do --Breaking down line by line.... for delimit in string.gmatch(line, '([^,]+)' ) do -- Breaking down each line by delimiter Table[#Table + 1] = delimit; -- Taking the delimited data and putting it into a table end ListBox.AddItem("Listbox1", Table[1], Table[2] ); -- Doing stuff with my table. Active = {}; -- Rinse and Repeat! end
Comment