Parsec allocating a lot of memory
Mon, 4 Aug 2003 19:16:44 +0200
Hi all, I am using "parsec" to parse the output from "xmame -listinfo"
wich is a list of records of the form
and for approx. 3500 records I got ~250 mb of RSS memory during parsing,
wich takes 20 seconds on my athlon 1400.
I think that I must have done something wrong (this is the first time I
use parsec), here is my parser:
games = many game
x <- manyTill attribute closeGame
return (mkGameInfo x)
x <- identifier
y <- tillEOL
string "game ("
whitespace = "\v\f\t\r "
whitespaces = skipMany (oneOf whitespace)
tillEOL = manyTill anyChar newline
identifier = many alphaNum
Thanks for any advice