too much memory use!

new topic     » topic index » view thread      » older message » newer message

Eu took 29 minutes, 36 sec to execute the following program, and used 
142.7Megs of memory. The file it was reading is 12.1 megabytes. 

data = {}
datafile = open(data_noun,"u")
readline = gets(datafile) -- get a line
while not atom(readline) do
  while find(readline[length(readline)],{10,13,32}) do readline = 
readline[1..length(readline)-1] end while
  junk_s = parse(readline,32)
  data = data & {junk_s}
  readline = gets(datafile) -- get another line
end while
close(datafile)
trace(1) -- to hold the program while getting memory use data
abort(0)

What am i doing that runs a 12meg file up to 142.7megabytes? and takes 
1/2 hour to do it?

How can i say data = glom(file) ?

Kat

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu