[plt-scheme] How to handle large data

From: Noel Welsh (noelwelsh at gmail.com)
Date: Thu Dec 18 04:17:40 EST 2008

On Thu, Dec 18, 2008 at 8:34 AM, Kenichi Asai <asai at is.ocha.ac.jp> wrote:
> I can open this file, but when I try to execute it, DrScheme says "out
> of memory" and when I switch off the memory limit, it runs forever.
>
> Is there any good way to load this file?

In MzScheme (NOT DrScheme) it loads without problem:

Welcome to MzScheme v4.1.1.3 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
> (load "postal.ss")
> (length postal-list)
121793

DrScheme tracks locations and does other stuff that improves debugging
but decreases performance.  I believe you can turn some of this stuff
off (and turn on the JIT).  Perhaps that will help.

> I tried (load "postal.ss"), but DrScheme says:
>
>  reference to undefined identifier: load
>
> Is this because I am using the language "beginning student"?

I think so.  You could try turning it into a module and use require
(though I don't know if the Beginning Student language includes
require).

HTH,
N.


Posted on the users mailing list.