<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&amp;XN1mW&amp;ltYNR" _mce_href="http://imgur.com/wBWmJ&amp;XN1mW&amp;ltYNR">http://imgur.com/wBWmJ&amp;XN1mW&amp;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>&nbsp;</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_. &nbsp;(Drag are those that are kept for longer than necessary.) &nbsp;Lots of Lag generally means your program is too strict - it is forcing structure long before it needs to. &nbsp;To fix it, you need to make things lazier. &nbsp;My first suspicion would fall on ByteString.</span></div><div><span><br></span></div><div><span>Regards,</span></div><div><span>&nbsp;&nbsp; &nbsp;Malcolm</span></div></body></html>