Closed banesullivan closed 4 years ago
It is not currently possible to throttle but I'll see if I can add that today 😀 . I may need some help from @martinRenou if I can't figure out how to do it. @martinRenou is right that iwork needs to be done on the javascript side to make this happen, though it will be controllable from the python side.
Also, thanks for reporting this!
I tried overriding the on_dom_event (the function being passed) with the throttler in https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Events.html#Throttling but it doesn't work here?
That example is useful for throttling calls from the python side of a widget. In this case the issue is that the javascript side of ipyevents is passing in every mouse move event with no throttling. If the event results in an expensive computation on the python side then you will see lag, especially if the python result also has to be transmitted back to javascript.
@mwcraig, thanks for jumping on this! Do let me know when you think you have something and I can give it a try
Is it possible to throttle the message queue? Any tips on how to do this?
I tried overriding the
on_dom_event
(the function being passed) with the throttler in https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Events.html#Throttling but it doesn't work here?See https://github.com/Kitware/ipyvtk-simple/pull/8