exceljs / exceljs/exceljs

Add support for backpressure indication when using streams

Open
#734 3 comments 5 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
15.5k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

I have a use-case where from my server I am fetching paginated data from a remote server and turning it into a streaming XLSX file download to the user. I might have to fetch data 50+ times to get all the data, and have a queue to manage concurrency.

The problem comes when we are fetching data faster than the user is downloading the data, and we keep pushing more and more data on, which causes memory issues.

This is solved in streams by having an indicator of backpressure where the stream indicates if more data is allowed to be pushed.

Since I have implemented my CSV stream by hand, I can pause the stream and wait as needed, but with this library don't see where I can know if I should be allowed to push more data or not to the stream.

Would it be possible to return the backpressure boolean indicator when a row is committed?

**Node Reference:** https://nodejs.org/en/docs/guides/backpressuring-in-streams/

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.