Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

There are errors in your xml file: out of memory #151

Open
TianboJi opened this issue Nov 28, 2017 · 7 comments
Open

There are errors in your xml file: out of memory #151

TianboJi opened this issue Nov 28, 2017 · 7 comments

Comments

@TianboJi
Copy link

I have a 1.7GB xml file which is exported from FileMaker Pro. When I use this module to parse it, it returns

Error: There are errors in your xml file: out of memory

Is there any way to solve it? I already add the parameter "--max-old-space-size=4096" but it doesn't work

@aakashmalhotra
Copy link

This plugin does not stream the file so the whole file is loaded into memory. Hence, the error you have.
Solution: Stream your data

@c4milo
Copy link
Contributor

c4milo commented Dec 1, 2017

@aakashmalhotra is right, even though we use node-expat which parses the XML document in streaming, we don't stream the resulting JSON structure out of the function.

@Matthbo
Copy link

Matthbo commented Mar 12, 2018

Isn't it a good idea to add an option to make it a stream?

@c4milo
Copy link
Contributor

c4milo commented Mar 12, 2018

@Matthbo, yes, it would be useful with big documents. I just don’t currently have the bandwidth to do it :/. Although, I’m open to reviewing contributions!

@cangSDARM
Copy link

I'm handling a 8G xml file. It's have the same problem for me. Hope it support streamable API in 2021

@aakashmalhotra
Copy link

Hi @cangSDARM,

you can use if you are dealing with huge files https://github.com/astro/node-expat

@cangSDARM
Copy link

@aakashmalhotra Thanks. I'll check that.

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

No branches or pull requests

5 participants