Slow Buffer.from when generating large web pages
Author: D-SketonCreated Oct 11, 2025Updated Nov 4, 2025
Labelsbug
Check List
Feature Request
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?
Source: hexojs/hexo