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

"JavaScript heap out of memory" exception on large json file #4

Open
jackharrhy opened this issue Jun 24, 2019 · 1 comment
Open

"JavaScript heap out of memory" exception on large json file #4

jackharrhy opened this issue Jun 24, 2019 · 1 comment

Comments

@jackharrhy
Copy link

to reproduce:

(warning: 180mb json file)

curl "https://github.com/zemirco/sf-city-lots-json/blob/master/citylots.json" > citylots.json
cat citylots.json | catj # <- out of mem.
catj citylots.json # <- also out of mem.
@soheilpro
Copy link
Owner

Since it loads the whole JSON file in memory, you have to have enough RAM available for it to run. On my machine with 16 GB of RAM it works fine.

If there's enough demand, I'll investigate rewriting it using a streaming JSON parser to lower the memory footprint.

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