Skip to content

Use TextDecoder for Buffer.toString? #268

Open

Description

@cmdcolin

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

  1. gsvarovsky commented on Sep 11, 2020

    @gsvarovsky

    Linking to #60 for reference

  2. feross commented on Nov 18, 2020

    @feross
    Owner

    I'm open to merging a PR that switches to TextDecoder. If you would like to see it implemented, please send a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions