haskell / attoparsec

A fast Haskell library for parsing ByteStrings
http://hackage.haskell.org/package/attoparsec
Other
512 stars 93 forks source link

Potential memory regression with 7.8 #78

Closed nh2 closed 10 years ago

nh2 commented 10 years ago

Hi,

I believe I'm seeing a regression with GHC 7.8 as compared to 7.6; it's documented here with an example file.

Could you check if you see the same? Thanks!

bos commented 10 years ago

Performance and memory usage are fine for me... Got more details?

nh2 commented 10 years ago

@bos What I mean is: In the code example from Stackoverflow I linked above, do you get the same memory characteristics (~ 150 MB resident with 7.6, 420 MB with 7.8)?

bos commented 10 years ago

By "performance and memory usage are fine for me", I mean "I do not see what the linked post reports".

nh2 commented 10 years ago

It reports that running a discarding parser over a 2.5 MB file takes half a gigabyte of resident memory on my machine with ghc 7.8, and 150 MB with ghc 7.8. Is that expected?

bos commented 10 years ago

Nicholas, I ran the program, and I DON'T SEE THAT HAPPEN. How many different ways do I need to repeat that?

bos commented 10 years ago

I'm sorry, that was inexcusably rude on my part.

I ran the test program under GHC 7.8.3 with a recent version of attoparsec, and it uses only 12MB of memory and completes quickly. That's what I mean when I say that I can't reproduce this. If you're actually seeing a memory consumption problem of some sort, I really do need more details so I can try to replicate it myself. That stackoverflow post simply isn't enough.

nh2 commented 10 years ago

Ah, now that's useful to know. It's odd that mine uses 10-30 times more memory than your 12 MB. I'll try to set up a TravisCI job so that we have a reproducible environment, and update this issue if it also appears in there.