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

remove the nesting in the callstack? #2466

Closed
ianstormtaylor opened this issue Dec 3, 2018 · 1 comment
Closed

remove the nesting in the callstack? #2466

ianstormtaylor opened this issue Dec 3, 2018 · 1 comment

Comments

@ianstormtaylor
Copy link
Owner

Do you want to request a feature or report a bug?

Improvement?

What's the current behavior?

With the current way next() is written, it results in longer callstacks that go something like:

onCommand
next
onCommand
next
onCommand
next
onCommand
next

But I don't think this is strictly necessary...

What's the expected behavior?

If we changed the implementation to use a loop instead, and make next just toggle a "continuation" boolean instead, I think we could achieve the same behavior with a flat call stack?

I'm not super familiar with the pros/cons of this. But it would make debugging nicer I'd think. Also it might avoid stack overflows in some cases since plugin count is no longer a factor.

@ianstormtaylor
Copy link
Owner Author

Fixed by #3093.

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

Successfully merging a pull request may close this issue.

1 participant