in reply to Re: Grammar based parsing methodology for multi MB strings/files (Marpa::R2/Regexp::Grammars)
in thread Grammar based parsing methodology for multi MB strings/files (Marpa::R2/Regexp::Grammars)

Your changes were certainly effective. The 2MB file I was parsing previously took 33+GB of memory to parse. Your updated changes require ~1GB.

I also tried the :discard lexeme to remove the Ows references. This worked on the first attempt, so I was clearly doing something wrong the first time around. This reduced the memory usage further to ~500MB and sped up the parse time. It now sits at about 15s vs. the old parser's 9s.

Many thanks for the insight. Now I get to figure out how to get the data back from the parse :)

  • Comment on Re^2: Grammar based parsing methodology for multi MB strings/files (Marpa::R2/Regexp::Grammars)