[plt-scheme] Typed-Scheme Memory Issues

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Wed Apr 8 05:23:42 EDT 2009

On Tue, Apr 7, 2009 at 7:51 PM, Sam TH <samth at ccs.neu.edu> wrote:
> That's certainly quite a lot of memory use - and a lot of Typed Scheme code!
>
> I don't know why it should take that much memory, but the one thing I
> do recommend is compiling your files to byte code.  DrScheme does this
> automatically in some cases, and you can do it manually with 'mzc -k'.
>  Once the file is compiled, typechecking is complete, and subsequent
> uses of that file should be much faster.  For example, if you have
> files A.ss, B.ss and C.ss, each of which depends on the preceding,
> then if you are changing C.ss a lot, then
>
> % mzc -k A.ss B.ss
>
> will likely improve your speed/memory issues.
>
> If that doesn't help, let me know, and I'll try to see if there's
> something in particular that's going wrong while typechecking your
> code.
>

Hi.

Something must be wrong. mzc compiles the files to bytecode in less
than 6 seconds (compared to more than a minute inside drscheme) and it
takes 5% of my memory (compared to 100%). So the question is, what
happens inside DrScheme that generates this issue?

After compiling the files to bytecode interepreting my main module in
DrScheme is a snap... so I guess this issue should be checked...
Doesn't seem to be a problem particular to Typed-Scheme but something
with the interaction between 'tools'. TypedScheme vs DrScheme. Maybe
the Dr doesn't like it typed?!? ;)

Cheers,

Paulo Matos

> sam th
>
> On Tue, Apr 7, 2009 at 3:45 PM, Paulo J. Matos <pocmatos at gmail.com> wrote:
>> Hi,
>>
>> I have been using typed-scheme for a bit now and my code base in typed
>> scheme is now involving [only] 4 modules with a total of 3000 loc.
>>
>> Unfortunately, though things have been pretty slow for me lately since
>> evaluating the main module of my project takes something in the order
>> of minutes requesting over 2Gb of memory. Since I [only] have 2 Gb of
>> memory, swapping starts and things get even slower.
>>
>> About this I don't know what to do but it needs to be improved. I have
>> taken a few screenshots so you can check how the memory evolves while
>> drscheme is interpreting a typed-scheme module [svn 14441]:
>> Idle:
>> Values http://users.ecs.soton.ac.uk/pocm06r/values_idle.png
>> Graph http://users.ecs.soton.ac.uk/pocm06r/graph_idle.png
>>
>> On Load:
>> Values http://users.ecs.soton.ac.uk/pocm06r/values_load.png
>> Graph http://users.ecs.soton.ac.uk/pocm06r/graph_load.png
>>
>> Note that I have mostly nothing else running besides the gnome
>> desktop... I sincerely don't know what to do. I hope this is just a
>> bug regarding memory handling and can be easily fixed.
>> If I can provide more info on this so it can be analyzed please let me know.
>>
>> Cheers,
>>
>> --
>> Paulo Jorge Matos - pocmatos at gmail.com
>> Webpage: http://www.personal.soton.ac.uk/pocm
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>
>
>
> --
> sam th
> samth at ccs.neu.edu
>



-- 
Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm


Posted on the users mailing list.