A
A
Alexander Buki2019-12-07 18:50:01
Node.js
Alexander Buki, 2019-12-07 18:50:01

How to read a file in parts in node js with a memory limit?

Let's say there is a text file containing a thousand lines of the form (numbers only):
4
6 2 26 64 88 96 96
4 8 20 65 86
7 1 4 16 42 58 61 69
1 84
memory consumption in 10 MB The
question appeared on the basis of this problem How to solve the problem with minimal memory usage?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Inviz Custos, 2019-12-07
@MvcBox

That's what streamers are for .
https://nodejs.org/api/fs.html#fs_fs_createreadstr...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question