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

Traversing larger forests quickly blows the stack #93

Open
CAD97 opened this issue Apr 19, 2019 · 2 comments
Open

Traversing larger forests quickly blows the stack #93

CAD97 opened this issue Apr 19, 2019 · 2 comments

Comments

@CAD97
Copy link
Contributor

CAD97 commented Apr 19, 2019

eddyb 2019-04-18 at 11:56 AM EDT
I need to optimize the iterators so they don't actually use BTreeSet iterators

eddyb 2019-04-18 at 11:57 AM EDT
right now you have deep tree multiplied by a large constant factor (the size of the iterators)

eddyb 2019-04-18 at 12:00 PM EDT
feel free to open an issue on the gll repo about stack usage of iteration of possibilities (which is what fmt::Debug does)

Right now, it's very easy to blow the stack when printing the debug representation of a gll forest of any nontrivial size.

@eddyb
Copy link
Member

eddyb commented Apr 20, 2019

Any recursive traversal will do this (as you end up with a lot of iterators on the stack).

@eddyb eddyb changed the title Debug::fmt quickly blows the stack Traversing larger forests quickly blows the stack Apr 20, 2019
@pczarn
Copy link

pczarn commented May 25, 2019

So, this could happen during forest evaluation too?

My parse forest uses explicit Vec stacks instead of recursion, here.

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

3 participants