<div dir="auto">Hmmm.... I'll take a look, but from what I see - it uses the same code as ghc-events for decoding and all the streaming done in a short single commit - it must suffer the same bug then. It is not a single stream of events, it's several of them per capability mixed due to caching done by RTS so you need to decode several streams at once and merge the results.</div><div class="gmail_extra"><br><div class="gmail_quote">On Oct 1, 2017 20:43, "Boespflug, Mathieu" <<a href="mailto:m@tweag.io" target="_blank">m@tweag.io</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You might want to have a look at<br>
<a href="https://github.com/mboes/ghc-events/tree/streaming" rel="noreferrer" target="_blank">https://github.com/mboes/ghc-<wbr>events/tree/streaming</a>. Similar to what<br>
you mention, it uses the "streaming" package for the incremental<br>
parsing. I ran into an issue with binary that I wasn't able to track<br>
down: even medium sized buffers make the parsing slower (significantly<br>
so) rather than faster (my suspicion: something somewhere that should<br>
be constant time is actually linear).<br>
--<br>
Mathieu Boespflug<br>
Founder at <a href="http://tweag.io" rel="noreferrer" target="_blank">http://tweag.io</a>.<br>
<br>
<br>
On 1 October 2017 at 14:34, Michael Baikov <<a href="mailto:manpacket@gmail.com">manpacket@gmail.com</a>> wrote:<br>
> On Sun, Oct 1, 2017 at 8:09 PM, Boespflug, Mathieu <<a href="mailto:m@tweag.io">m@tweag.io</a>> wrote:<br>
>> Note that the (AFAIK unreleased) version of ghc-events on the master<br>
>> branch of the upstream repo can parse event streams incrementally, if<br>
>> that's what you meant.<br>
><br>
> It can but it got some problems. For one the only thing incremental<br>
> parser can do is to print the output - for everything else old parser<br>
> will be used and output of that incremental is partially out of order<br>
> due to the way event blocks are stored. Anyway, I already have my own<br>
> version that does proper incremental parsing, provides interface with<br>
> a streaming library and collects some info that wasn't available in<br>
> the original version. How it's more about shuffling stuff around,<br>
> cleaning and testing.<br>
</blockquote></div></div>