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

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@pepve

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
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 referenced this pull request Aug 21, 2012
Open

Stack overflow v2 #44

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