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

Fix performance issue with large queues #16

Merged
merged 1 commit into from
Mar 16, 2019

Conversation

MattiasBuelens
Copy link
Owner

Add a SimpleQueue that queues elements in bounded chunks, to avoid scalability issues with large arrays in Chrome.

Fixes #15

Add a SimpleQueue that queues elements in bounded chunks,
to avoid scalability issues with large arrays in Chrome.
@MattiasBuelens
Copy link
Owner Author

MattiasBuelens commented Mar 15, 2019

Initial results show much better performance (using polyfill.es6.min.js):
web-streams-polyfill

These results are comparable or better than native streams:
native

Amazingly, @stardazed/streams-polyfill is even faster, sometimes over 2x faster than native! 😲
stardazed-streams

It looks like there's still room for improvement.

@MattiasBuelens MattiasBuelens added this to the v2.0.1 milestone Mar 15, 2019
@MattiasBuelens MattiasBuelens self-assigned this Mar 16, 2019
@MattiasBuelens MattiasBuelens merged commit 283a0ce into master Mar 16, 2019
@MattiasBuelens MattiasBuelens deleted the fix-queue-performance branch March 16, 2019 11:05
@matthiasbayer
Copy link

Awesome! 😍

@MattiasBuelens
Copy link
Owner Author

Released as 2.0.1.

In the future, I want to set up automated benchmarks to compare the polyfill's performance against native implementations or other polyfills. Hopefully, that will help to find and fix other performance issues, and to figure out how Stardazed can be that fast. 😛

@MattiasBuelens MattiasBuelens added domain: performance Issues related to slow performance or high memory usage bug labels Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug domain: performance Issues related to slow performance or high memory usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants