IMAP's `fetch` results with extreme memory usage and computer freezing.
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- haskell
- 领域
- networking
调研方向
Start by reproducing retrieveCSV with fetch con lastMsg and compare its memory use with fetchHeader and fetchSize. Trace the HaskellNet IMAP fetch entry point to determine whether the library or caller causes the excessive allocation; done means establishing the cause and verifying a focused fix or documented explanation.
由索引模型根据 Issue 内容生成。
描述
I have written the following function using the HaskellNet and HaskellNet-SSL libraries.
Using the "fetch" function results with memory usage blowing up and extreme swapping.
What am I doing wrong? Might it be a bug?
import qualified Data.ByteString.Char8 as SB8
import Network.HaskellNet.IMAP
import Network.HaskellNet.IMAP.SSL
main = retrieveCSV
retrieveCSV = do
con <- connectIMAPSSL imapServer
login con username password
select con mailbox
lastMsg <- last <$> search con [ALLs]
-- this works:
_ <- fetchHeader con lastMsg
-- this works:
_ <- fetchSize con lastMsg
-- this blows up in memory usage:
_ <- fetch con lastMsg
undefined
where
imapServer = "imap.gmail.com"
username = "example" -- imagine this username is real
password = "example" -- imagine this password is real
mailbox = "example" -- imagine this mailbox is real
- 主要语言
- Haskell
- 星标
- 92
- 派生
- 57
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
qnikst/HaskellNet 的其他 Issue
-
难度 2/5 1 小时以内 新手友好度 65/100
qnikst/HaskellNet#125 ·
-
难度 3/5 1-2 天 新手友好度 35/100
qnikst/HaskellNet#107 · 1 条评论 ·
-
feature
难度 5/5 一周以上 新手友好度 25/100
qnikst/HaskellNet#84 ·
-
feature
难度 5/5 一周以上 新手友好度 25/100
qnikst/HaskellNet#80 ·
-
feature help needed
难度 5/5 一周以上 新手友好度 35/100
qnikst/HaskellNet#77 ·
查看 qnikst/HaskellNet 的全部 Issue
相似的 Issue
-
Bug
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
GaloisInc/llvm-pretty#211 ·
-
难度 2/5 1-3 小时 新手友好度 74/100