feross / feross/buffer

Use TextDecoder for Buffer.toString?

Open
#268 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.9k
Forks
260
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.