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

Refactor Downloader() to fix or remove recursion. #9

Closed
stevenbenner opened this issue Mar 22, 2014 · 2 comments
Closed

Refactor Downloader() to fix or remove recursion. #9

stevenbenner opened this issue Mar 22, 2014 · 2 comments
Labels

Comments

@stevenbenner
Copy link
Owner

Right now the Downloader() object uses recursion to iterate through the list. This is problematic because it will lead to a very large call stack unless you use a setImmediate() to break out of it (see: commit 747ce13).

I do not like the setImmediate() approach because it feels like a code smell. So this object needs to be refactored to either replace the recursion with some flavor of simple iteration or the recursion needs to be implemented in such a way that it wont negatively impact the call stack or memory usage.

@stevenbenner stevenbenner changed the title Refactor Downloader() to fix or remove recursion. Refactor Downloader() to fix or remove recursion. Mar 22, 2014
@stevenbenner stevenbenner changed the title Refactor Downloader() to fix or remove recursion. Refactor Downloader() to fix or remove recursion. Mar 22, 2014
@medienoekonom
Copy link

it works. so i dont give a fu§! :)

@stevenbenner
Copy link
Owner Author

I'm inclined to agree.

It has been 8 years and I haven't felt the need to make this optimization yet, so I'm just going to close this issue.

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

No branches or pull requests

2 participants