Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy leaking memory #29

Open
vladmiller opened this issue Feb 16, 2013 · 1 comment
Open

Lazy leaking memory #29

vladmiller opened this issue Feb 16, 2013 · 1 comment

Comments

@vladmiller
Copy link

I'm trying to read line by line very huuuuuuuuuuuge csv file, it have about 500M rows

new lazy(fs.createReadStream('Very huuuuuuugeeee csv file'))
.lines
.forEach(function(row) {
console.log(row.toString())
});

And lazy leaking memory so bad. Let me know what other information do you need.

Env: Windows 7 x64 8GB Ram, Intel Quad Core

@carsondarling
Copy link

This is significantly later, but I'm having the same issue as well.

Lazy(fs.createReadStream(item))
      .lines
      .forEach(function(line) {
        line = line.toString();

        var j = line.match(/\{.*\}/);
        if (!j || j.length < 1) return done();

        try {
          j = JSON.parse(j[0]);
          output.write(JSON.stringify(j) + '\n');
        } catch (e) {}

      })
      .join(function() {
        done();
      });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants