I have some pretty large buffers (~45MB) I'm decoding, and they can create a large "GC pressure" With TextDecoder start: 42ms With buffer.toString() start: 838.85302734375ms I know there have been discussions about TextEncoder/TextDecoder in the past, but thought I'd mention the performance boost here
Activity
gsvarovsky commentedon Sep 11, 2020
Linking to #60 for reference
parse-sax: use native TextDecoder in browser when available
browser: use TextDecoder and TextEncoder for buffer
browser: use TextDecoder and TextEncoder for buffer
xlsx: use TextDecoder and TextEncoder in browser
xlsx: use TextDecoder and TextEncoder in browser
xlsx: use TextDecoder and TextEncoder in browser
xlsx: use TextDecoder and TextEncoder in browser
feross commentedon Nov 18, 2020
I'm open to merging a PR that switches to
TextDecoder. If you would like to see it implemented, please send a pull request!