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

Throttle rendering #8

Merged
merged 6 commits into from
Jul 6, 2020
Merged

Throttle rendering #8

merged 6 commits into from
Jul 6, 2020

Conversation

banesullivan
Copy link
Contributor

Resolve #3

@banesullivan
Copy link
Contributor Author

Performance still isn't amazing on MyBinder. It appears the DOM events are the bottleneck now

I tried throttling the dom event locally but it didn't seem to work... will keep experimenting

@martinRenou
Copy link

It appears the DOM events are the bottleneck now

It might be something to improve in ipycanvas directly, preventing too many mouse events to be sent to the Python kernel.

@banesullivan
Copy link
Contributor Author

Where exactly could we do this? I tried overriding Canvas._mouse_move_callbacks with a throttle decorator but this had no effect. The only thing is we definitely do not want to throttle/limit any click events, only the mouse move events

@martinRenou
Copy link

This is something that should be done JavaScript side, you cannot have control on it Python side unfortunately

@banesullivan
Copy link
Contributor Author

Ah, I see. I will merge these changes if @davidbrochart thinks they are okay and wait for the remainder to be fixed in ipycanvas or ipyevents

@martinRenou
Copy link

I missed that ipyevents was involved.

@mwcraig do you think it could make sense to add the ability for users to limit mouse events (from the JavaScript side) in ipyevents? Or is it already possible?

@banesullivan banesullivan changed the title Throttle rendering Throttle rendering and mouse events Jul 2, 2020
@davidbrochart
Copy link

I will merge these changes if @davidbrochart thinks they are okay

LGTM except for the very small values, I don't know if it has any effect.

@banesullivan
Copy link
Contributor Author

Thanks, @davidbrochart!

@banesullivan banesullivan changed the title Throttle rendering and mouse events Throttle rendering Jul 6, 2020
@banesullivan banesullivan merged commit 87a2d98 into master Jul 6, 2020
@banesullivan banesullivan mentioned this pull request Jul 8, 2020
1 task
@banesullivan banesullivan deleted the throttle branch July 21, 2020 18:06
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.

Improve interactive performance
3 participants