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

Events queue in emitter can grow without bound, leading to "out of memory" in runtime #873

Open
vjorlikowski opened this issue Jul 15, 2022 · 1 comment

Comments

@vjorlikowski
Copy link

vjorlikowski commented Jul 15, 2022

While generating large YAML documents in one of our projects, we encountered an issue where we could easily run out of memory in the emitter.

It turned out that the reason was that the events queue was growing without bound.

We have patched this in a fork, possibly in a sub-optimal fashion; the patch can be found here:

a24d571

The "deep-copy-to-shrink" strategy may not be ideal (lots of allocs, lots of GC), but it allows our document generation to successfully complete.

@costela
Copy link

costela commented Jan 19, 2023

We also observe a similar phenomenon, causing multiple megabytes of memory usage when dumping a ~400kb YAML file:
image

(this is 2.4.0, but the code in question does not seem to have been touched in v3?)

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