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

perf improvement: use Promise.all to await results #2

Closed
wants to merge 1 commit into from

Conversation

garrettjstevens
Copy link
Contributor

I ran into this same improvement working on tribble-index-js. Moving the await outside the loop seems to improve performance. To test, I ran the test suite 100 times. Before the change it took 226.8s, after it took 186.85s.

@rbuels
Copy link
Contributor

rbuels commented Sep 23, 2018 via email

@garrettjstevens
Copy link
Contributor Author

Oh, good point. Let me see if I can figure out a good way to test the memory usage of this under load...

@garrettjstevens
Copy link
Contributor Author

I tested this change out in JBrowse and didn't see any noticeable difference for better or worse. Probably better to stick on the safe side memory-wise if there's no appreciable improvement in practice. Closing.

@garrettjstevens garrettjstevens deleted the promise_all_perf_improvement branch October 8, 2018 18:59
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

Successfully merging this pull request may close these issues.

2 participants