News for hackers. Stuff that matters.
Re:Async Iterators: These Promises Are Killing My Performance by iamleppert on Sunday August 27, 2017 @04:48PM (#15112630)
Not a scientific test:

  var fs = require(‘fs’),
   csv = require(‘csv-parser’);
  var start = new Date().getTime();
  fs.createReadStream(‘./Batting.csv’)
   .pipe(csv())
   .on(‘data’, function() {})
   .on(‘end’, function() {
     console.log(new Date().getTime() — start);
   });
This takes about 400 ms on my machine to parse a 6.1 MB CSV (15.25 MB/s). I didn’t do anything useful with the data, but I did verify it exercises the parsing function.

Clearly all the work/time is spent in the actual parsing and handling corner-cases in CSV trying to be correct over high performance/throughput.

There are no comments on this comment yet.