[plt-scheme] Typed-Scheme Memory Issues
It might still be worth examining why TS uses so much memory.
Type checking should be linear in space in the source code,
though I suspect that this is not quite true when you use
unions and other commutative/associative things that require
extra work. But, type checking 3000 lines of code should
never use 2GB. -- Matthias
On Apr 7, 2009, at 3:51 PM, Sam TH 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.
>
> 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
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme