fix TextDecoder streaming to ignore empty chunks#6212
Conversation
|
I'm Bonk, and I've done a quick review of your PR. Summary: Workaround for an Findings:
The C++ fix itself is correct and minimal — returning an empty string for empty non-flush buffers avoids tickling the encoding_rs bug while preserving flush semantics (where an empty buffer still needs to finalize pending state). |
|
@anonrig I re-tested workerd, it now passes my streaming and snapshot tests! Nice It also passes the heavy tests |
|
... it somehow manages to be at least 1.5x slower than my js impl though, on workerd JS: Native: That includes the whole setup/snapshot logic etc, so it's actually more than 1.5x |
|
Performance is likely not that significant for legacy encodings though |
If I understood correctly, this should fix #6193
Fixes #6193
cc @ChALkeR