haskell / haskell/containers

Think about plugging potential Data.Tree unfoldTreeM_BF space leak

未关闭
#199 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
performance Tree
主要语言
Haskell
星标
355
派生
194
平均合并
3 天 4 小时
30 天内合并 PR
4

描述

`unfoldForestM_BF` (both the current implementation and the level-wise one in #198) has a potential space leak. In particular, we need to keep track of the number of children of each node when we dump the child seeds into the queue or concatenate them all. The implementations do this by holding on to the seed lists until it's time to rebuild, and then (one way or another) counting the seeds in each. If the seeds are large, this is potentially a problem. If we want, we can force the seed count earlier, avoiding the leak. However, I haven't yet found a way to do this that doesn't lead to performance problems.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。