08-22-2022, 03:34 PM
(08-22-2022, 03:29 PM)Spriggsy Wrote: I wonder how it compares to using GET or PUT in regards to getting or putting the whole data. Most of the time, rather than doing a LINE INPUT, I just do a GET and then split the filled string into an array to work with.
That's basically what we're doing here. We load the whole file into a mem block (the old method which you're talking of would load the whole file into a string). Then it parses that memblock looking for CRLF characters to split it apart into the lines to return with MemLineInput. (Basically the same as the old method where we search with INSTR for the CRLF characters.)
I haven't ran any timed tests to compare yet, but I imagine the times wouldn't be extremely off. This might be a little faster by checking for unsigned bytes rather than doing string compares like INSTR does, but I don't imagine it'd be a ton faster. I'll give it a timed test soon and report back to you with exact figures.