Skip to content

Proposal: Improve partial CSV processing performance by enabling buffer‑based operations #66658

Description

@FukuzawaTetsu

What is the problem this feature will solve?

Many Node.js users need to process CSV files partially — for example, reading only specific rows or columns without loading the entire file into the V8 heap.

However, most existing CSV libraries convert the entire CSV into strings or objects, which:

-increases heap usage
-triggers unnecessary garbage collection
-slows down partial data extraction
-wastes resources when only a small portion of the CSV is needed

Why this matters
For large CSV files (hundreds of MB or several GB), loading the entire file into memory is inefficient.
A buffer‑based approach allows users to extract only the required segments without converting the whole file into strings.

What is the feature you are proposing to solve the problem?

Example solution
I created an npm module called getdatafromcsvbuffer, which manipulates CSV data directly from raw Buffer operations.

Key characteristics:

operates directly on Buffer
-avoids string conversion and split()
-significantly reduces heap usage
-minimizes GC pressure
-ideal for partial CSV extraction

This approach demonstrates that CSV processing can be much faster when using Buffer‑only operations.

Reference
Package: https://www.npmjs.com/package/getdatafromcsvbuffer

Proposal
I would like to propose discussing whether Node.js could:

1.Provide official utilities for partial CSV processing using Buffer

2.Offer APIs that help developers manipulate structured text formats without converting entire files into strings

3.Consider exposing lower‑level primitives that make buffer‑based parsing easier and more ergonomic

This could benefit workloads involving:

-machine learning data preprocessing
-ETL pipelines
-log processing
-large CSV datasets
-streaming analytics

I would appreciate feedback from the Node.js team on whether such functionality aligns with Node’s direction or could be considered for future enhancements.
I will not hesitate to give you the benchmark if you need, so please ask me .

What alternatives have you considered?

No response

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

    feature requestIssues requesting new Node.js features.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions