Consider streaming decryption/write path to reduce peak memory usage for large files
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- javascript
- Bereich
- cryptography, performance
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Haskell
- Sterne
- 865
- Forks
- 125
- Ø Merge
- 1 T. 20 Std.
- Gemergte PRs (30 T.)
- 64
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus simplex-chat/simplexmq
-
xftp CLI: Generated web link is missing the /file pathEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
simplex-chat/simplexmq#1853 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
simplex-chat/simplexmq#1781 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 32/100
simplex-chat/simplexmq#2074 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
simplex-chat/simplexmq#2017 ·
Maintainer antworten meist innerhalb von 1 Tag
-
resolver: resolve .simplex names, on smp7 and then on the preset routersEvtl. vergeben @shumvgolove hat das vor 18 Tagen übernommen. Offen
simplex-chat/simplexmq#2011 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in simplex-chat/simplexmq
Ähnliche Issues
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
alunduil/siren-json.hs#322 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Dead link in readmeOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
commercialhaskell/rio#287 ·
-
wide-word-0.2Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
commercialhaskell/stackage#8181 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug desktop
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
simplex-chat/simplex-chat#8291 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG]: C# programs with top-level statements fail to compileEvtl. vergeben @AsyncNigam hat das vor 1 Tag übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
compiler-explorer/compiler-explorer#9625 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag