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

Slow async captureScreenshot #114

Closed
BlackHC opened this issue Apr 28, 2016 · 1 comment
Closed

Slow async captureScreenshot #114

BlackHC opened this issue Apr 28, 2016 · 1 comment

Comments

@BlackHC
Copy link
Contributor

BlackHC commented Apr 28, 2016

async captureScreenshot is about ~40x slower than the synchronous version (taking a 800x600 screenshot takes ~20s vs 500ms). This is because captureScreenshot returns a Stream containing the bytes making up the png screenshot and we have to call Stream.toList() to write the screenshot to a file. Compared to returning the list directly, it is 5000x slower in a test. (100x slower because of wrapping it in a Stream and async_/yield_ and 50x slower because of unittest & stack_trace).

The suggested solution is to add a captureScreenshotAsList method back that returns a simple List.
See also captureScreenshotAsBase64 #112

@goderbauer
Copy link
Member

Thanks for the contribution.

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

No branches or pull requests

2 participants