-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
- Version:
- Platform:
- Subsystem:
REQUEST: Would you consider moving to a pool scheme since it'll boost performance without changing the API?
fs.ReadStream allocates 64KiB (default, change via highWaterMark) sized Buffer objects as it reads through files which are released downstream when no longer needed. With larger files, this can result in a lot of time spent allocating Buffer objects only to have them picked up in GC, which in by itself can add up to a lot.
Reducing allocations with a buffer pool should boost performance across the board with respect to file size without foreseeable changes to the public API.
See post for more details.
Performance vs File Size
Percentage Boost in Performance
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.

