• Iustin Pop's avatar
    htools: rework message display construction · bdd8c739
    Iustin Pop authored
    
    
    While diagnosing some (unrelated) memory usage in htools, I've
    stumbled upon some very bad behaviour in checkData: mapAccum is
    non-strict, and the tuple we use also, so that results in the list of
    list of messages being very bad space-wise (hundreds of MB of memory
    for a simulated cluster with thousands of nodes, all with errors).
    
    The new, explicit reuse of the old message list has a linear memory
    behaviour. The only downside is that messages are listed in the
    reverse order (which I'll fix on master).
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    bdd8c739
Loader.hs 12.6 KB