Ben Rubinstein wrote:
On 20/03/2016 10:56, Roland Huettmann wrote:
There is no way of just opening and reading such last file into memory, at
least not on my computer with limited RAM. Usual text processors also do
not open such large files. LiveCode simply does not read such file and "it"
remains empty. (There should be an error message in "the result" though.)

http://quality.livecode.com/show_bug.cgi?id=2772

That's a useful enhancement request, for making sure LC degrades gracefully in low-memory situations.

But that seems different from what Roland was asking about. He needs to work with a 38GB file, beyond the memory address space of LC, and impractical for many programs.

When faced with a file that large most apps will read it in chunks, and as of several versions ago LC can do this gracefully: "seek" and "read at" were enhanced to allow locations as large as the host file system permits. With this we can traverse files far bigger than would be practical in RAM.
<http://quality.livecode.com/show_bug.cgi?id=11828>

Oddly enough, when I was experimenting with chunked reading I started with 10 MB chunks, thinking the less I touched the disk the better. But I found my routines got faster as I tried smaller reads, all the way down to about 130k where the comparison leveled off. Apparently memcopy is not with its own overhead.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to