This is my code. The file has like 1 million lines and 134mb. I don't think it is a big file but why I always failed loading it? It shows "out of memory" when reading at like 700,000 lines. Is there any lua mechanism I don't know? I use luajit.
function unsupervised_re.read_seq_ids(seq_path)
local seq_ids = {}
local file = io.open(seq_path, 'r')
local count = 0
while true do
local line = file:read()
count = count + 1
print (count)
if line == nil then break end
local tokens = stringx.split(line, ' ')
seq_ids[#seq_ids+1] = tokens
end
file:close()
return seq_ids
end