hexojs / hexojs/hexo

Slow Buffer.from when generating large web pages

Open
#5,705 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
41.8k
Forks
41
PR merge metrics
No merged PRs in 30d

Description

### Check List

### Feature Request

Image

https://github.com/hexojs/hexo/blob/c69553c76d6f20c9bc7be1af98ed2c6c4e8c372c/lib/hexo/router.ts#L33

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.