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

Writing the generated combinations to a file #57

Open
astutesoftware opened this issue Jan 26, 2019 · 1 comment
Open

Writing the generated combinations to a file #57

astutesoftware opened this issue Jan 26, 2019 · 1 comment

Comments

@astutesoftware
Copy link

I have generated a billion combinations using this.
What is an efficient way to quickly write them to disc.
So far i keep running out of memory while using fs methods.

@blanchg
Copy link
Contributor

blanchg commented Jan 26, 2019

I would create a readable stream from the generator of this library and a writable stream from 'fs' then just readable.pipe(writable) assuming you are using nodejs.

The issue is you aren't leaving node any time to flush the suitable stuff to disc.

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