<html><body><div><blockquote type="cite"><div class="msg-quote"><div class="_stretch">ad a) heap consumption is too high for two reasons: firstly, the actual data I<br>
care about is much less than there's data on the heap. Secondly, about half the<br>
heap space is in LAG state. Here are profiles that will illustrate this:<br>
<a href="http://imgur.com/wBWmJ&XN1mW&ltYNR" _mce_href="http://imgur.com/wBWmJ&XN1mW&ltYNR">http://imgur.com/wBWmJ&XN1mW&ltYNR</a>.<br>
<br>
- The first image shows 50% of the heap space being gobbled up with data that<br>
shouldn't be there anymore (LAG)<br>
- The second image shows the types that are in LAG state: ByteString and<br>
HashMap. So, it seems I'm keeping around hash maps?</div></div></blockquote><span> </span></div><div><span><br></span></div><div><span>In Lag/Drag/Void/Use profiling, Lag is actually heap cells that are created too _early_. (Drag are those that are kept for longer than necessary.) Lots of Lag generally means your program is too strict - it is forcing structure long before it needs to. To fix it, you need to make things lazier. My first suspicion would fall on ByteString.</span></div><div><span><br></span></div><div><span>Regards,</span></div><div><span> Malcolm</span></div></body></html>