1

What is the best way to read a very large file line-by-line (like a text file having 50,000,000 lines, the file size is larger than 8GB). Actually, there are dozens of thus files.

Basically, it need to read those file one-by-one. For each file, after read one line, it will do something that take some time to complete (such as, make an http request to send the data to a remote service. In this case, the http request is slower than reading file.)

Thank you.

Linlin
  • 2,127
  • 5
  • 20
  • 25
  • It 's a common question, answered here: http://stackoverflow.com/questions/6156501/read-a-file-one-line-at-a-time-in-node-js – rollingBalls Aug 28 '14 at 11:26

1 Answers1

0

What? Send 50,000,000 http request?Are you making a DDOS?

Maybe you should try another way.

Why not upload this file?

yangsibai
  • 1,637
  • 12
  • 23