Michael Schlenker wrote:

i noticed a strange thing with a current project:
I use the Mk4tcl binding from Tclkit 8.4.5 on Windows 2000, now i parse a textfile containing strings and an integer associated with the string.
Something like:


10     AB_0057357
11     CF_8463800
11     CD_3648208
(about 270.000 records, 10 MB)
[...]
The strange thing i see is the memory hunger of this construction.
It eats memory like nothing, the shell grows to 300 MB with size jumps in the range of up to 50MB in both directions, but the datafile produced on disk is only 4MB in size.
If i process the data line by line i don't get this huge memory hunger. I'm quite sure that i don't copy anything.

This memory use is indeed extreme. The most memory-hungry scenario of MK is with lots and lots of subviews with lots and lots of properties (there are some cases of 4 Kb buffers, which leads to a lot of slack). Nothing as extreme as you describe, though.


I'm not sure if Metakit or XOTcl or the normal Tcl is the thing that creates trouble here. With tclkit 8.4.1 it crashes actually with a can't realloc 1622777730 bytes dialog box popping up.

The cases I've seen this happen is when there is a 32/64-bit size mixup in stat, i.e. when Tcl and some extension were not built with matching 64-bit-ness for file offsets and such.


-jcw

_____________________________________________
Metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to