Skip to content

Slow Buffer.from when generating large web pages #5705

@D-Sketon

Description

@D-Sketon

Check List

Feature Request

Image

return Buffer.from(data); // Assume string is UTF-8 encoded string

When the generated web page has a large size, this becomes a performance bottleneck.

I don't quite understand why we need to convert the string to a buffer and then write it back to the file. Is it possible to skip the process of converting to a buffer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions