You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runGetState takes the Lazy ByteString, and turns it into a list of chunks.
The leftover data that did not get consumed gets converted back into a Lazy ByteString. When that happens, empty chunks gets filtered out. The filter is not strict though.
When this gets repeated many times, there are lots of filters applied to the same lazy bytestring. These multiple filters can eat the whole stack.
The patch above solves it, but needs to be used for more functions in the module before we close this issue.
This quickly gets expensive if called multiple times, and can build up a huge stack if called multiple times, like so:
Code from http://stackoverflow.com/questions/9567040/poor-performance-parsing-binary-file-in-haskell/9573661#9573661
The text was updated successfully, but these errors were encountered: