Consider streaming decryption/write path to reduce peak memory usage for large files
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 冷清
- 技術堆疊
- javascript
研究方向
Start by locating the download verification/decryption flow that accumulates chunks[], calls concatBytes(...chunks), and allocates Uint8Array(pLen), then read the streaming primitives sbInit and sbDecryptChunk. The issue does not define an implementation scope; clarify the architecture and acceptance criteria for incremental writes, final authentication failure cleanup, padding/header parsing, and resumable downloads before coding.
由索引模型根據 Issue 內容生成。
描述
I noticed the current download verification/decryption flow buffers the full encrypted file into memory before decrypting.
Current flow appears to:
accumulate encrypted chunks in chunks[]
concatenate them via concatBytes(...chunks)
allocate another full plaintext buffer with new Uint8Array(pLen)
This can significantly increase peak memory usage for large files, especially on mobile browsers.
The crypto layer itself already seems stream-capable (sbInit, sbDecryptChunk, incremental Poly1305 state), so I was wondering whether a more streaming-oriented architecture could be considered in the future.
Possible direction:
download chunk
→ decrypt incrementally
→ write plaintext directly to OPFS/temp storage
→ finalize/verify auth tag at end
This could reduce peak RAM usage from approximately full-file-size multiples down to near chunk-size memory usage.
I understand there are important tradeoffs around:
final authentication validation
temporary storage cleanup on auth failure
padding/header parsing
resumable download behavior
So I wanted to ask whether this direction would be desirable before experimenting with an implementation.
- 主要語言
- Haskell
- 星號
- 865
- 分支
- 125
- 平均合併
- 1 天 20 小時
- 30 天內合併 PR
- 64
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
simplex-chat/simplexmq 的其他 Issue
-
xftp CLI: Generated web link is missing the /file path可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
simplex-chat/simplexmq#1853 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
simplex-chat/simplexmq#1781 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 32/100
simplex-chat/simplexmq#2074 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
simplex-chat/simplexmq#2017 ·
維護者通常 1 天內回覆
-
resolver: resolve .simplex names, on smp7 and then on the preset routers可能已有人在做 @shumvgolove 於 18 天前認領。 未關閉
simplex-chat/simplexmq#2011 · 2 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 simplex-chat/simplexmq 的全部 Issue
相似的 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 70/100
alunduil/siren-json.hs#322 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
commercialhaskell/rio#287 ·
-
wide-word-0.2未關閉
難度 2/5 1-3 小時 新手友好度 62/100
commercialhaskell/stackage#8181 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug desktop
難度 2/5 1-3 小時 新手友好度 85/100
simplex-chat/simplex-chat#8291 ·
維護者通常 1 天內回覆
-
[BUG]: C# programs with top-level statements fail to compile可能已有人在做 @AsyncNigam 於 1 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 76/100
compiler-explorer/compiler-explorer#9625 · 1 則留言 ·
維護者通常 1 天內回覆