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

XMLEventReader OutOfMemoryError on very long but flat XML input #3840

Closed
scabug opened this issue Sep 14, 2010 · 4 comments
Closed

XMLEventReader OutOfMemoryError on very long but flat XML input #3840

scabug opened this issue Sep 14, 2010 · 4 comments

Comments

@scabug
Copy link

scabug commented Sep 14, 2010

XMLEventReader can run out of memory on very long input of this type:

<foo>
  <bar/>
  <bar/>
  <!-- millions more <bar/> -->
</foo>

This type of input is typical for a table export with lots of rows.

I've traced this back to XMLEventReader.elem which generates dummy tags. These tags are then collected into the parent node in a NodeBuffer. Eventually, the NodeBuffer exhausts the available heap.

@scabug
Copy link
Author

scabug commented Sep 14, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3840?orig=1
Reporter: huynhjl
Attachments:

@scabug
Copy link
Author

scabug commented Sep 14, 2010

huynhjl said:
Sample object file that causes the behavior

@scabug
Copy link
Author

scabug commented Sep 14, 2010

huynhjl said:
Patch to XMLEventReader (returns NodeSeq.Empty except for top node)

@scabug
Copy link
Author

scabug commented Sep 16, 2010

@paulp said:
(In r23018) Modified XMLEventReader to write dummy tag only once.
Contributed by Jean-Laurent Huynh, reviewed by extempore. Closes #3840.

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

No branches or pull requests

1 participant