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

feat: convert recursion to iteration #49

Closed
buehler opened this issue Jan 23, 2018 · 2 comments
Closed

feat: convert recursion to iteration #49

buehler opened this issue Jan 23, 2018 · 2 comments

Comments

@buehler
Copy link
Owner

buehler commented Jan 23, 2018

Convert the recursive parsing process into an iterative one (for better memory consumption and performance)

@shobhitg
Copy link
Contributor

shobhitg commented Feb 4, 2018

Which part of the code is recursive that needs to be iterative?

@buehler
Copy link
Owner Author

buehler commented Feb 5, 2018

It's actually this function:
https://github.com/buehler/node-typescript-parser/blob/develop/src/TypescriptParser.ts#L154

I thought of a worker / creator setup in which a function can create working tasks that are later used by workers to parse the symbols. And when they encounter next parts that should be parsed, they can create a task. Or maybe with RXJS and an observable.

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

No branches or pull requests

2 participants