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

Test and fix for stack overflow when rendering very large arrays #43

Closed
wants to merge 1 commit into from

Conversation

pepve
Copy link
Contributor

@pepve pepve commented Aug 20, 2012

I ran into this issue when trying to render a template that iterated over a very large array. I think the same issue exists with very large objects or a very large amount of simple tags. This commit would fix that too.

Also, I'm open to suggestions how to make this look less like a hack. :-)

@raycmorgan
Copy link
Owner

Thanks for the the bug report and knocking this out. I ended up rewriting the code a bit, but used your tests. The process.nextTick on every iteration hurt performance pretty badly (you can run test/bench.js for a bad benchmark, but decent baseline).

@pepve pepve mentioned this pull request Aug 21, 2012
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

Successfully merging this pull request may close these issues.

2 participants