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

Slider callback_policy should work for apps #4540

Closed
bryevdv opened this issue Jun 16, 2016 · 11 comments · Fixed by #8914
Closed

Slider callback_policy should work for apps #4540

bryevdv opened this issue Jun 16, 2016 · 11 comments · Fixed by #8914

Comments

@bryevdv
Copy link
Member

bryevdv commented Jun 16, 2016

Currently callback_policy only affects the triggering of JS callbacks, but it would be extremely useful to be able to throttle callbacks triggered on the server as well. It's possible that throttle mode is not very consistent with this, we might have to interpret throttle as mouseup for purposes of rate-limiting server updates.

@bill10
Copy link

bill10 commented Aug 7, 2016

+1 for this. I will be looking forward to this as I am running some expensive calculation.

@crashMOGWAI
Copy link
Contributor

👍 Just ran into this issue while working with the server and trying to filter large data sets via the sliders.

@bryevdv
Copy link
Member Author

bryevdv commented Oct 10, 2016

There's a workable solution on stack overflow. Apologies, I can find it on a phone.

@crashMOGWAI
Copy link
Contributor

If anyone else finds this issue:
http://stackoverflow.com/questions/38375961/throttling-in-bokeh-application

@sandipde
Copy link

Just ran into this issue. Is there any workaround for this. I want to have the slide.on_change event to occur at 'mouseup'.

@w4nderlust
Copy link

+1
Adding on_mouseup or something similar to sliders would be much appreciated, at the moment the on_change function is called more often than it can be computed in my project too.

@bryevdv
Copy link
Member Author

bryevdv commented May 9, 2018

There is a serviceable workaround in the StackOverflow answer linked above

@w4nderlust
Copy link

@bryevdv thanks for pointing it out. I actually found it before this issue thread, and I consider it an ugly hack rather than a workaround :)

@bryevdv
Copy link
Member Author

bryevdv commented Jun 4, 2018

@w4nderlust that sort of comment is neither useful nor appreciated. There is currently more work than people to do it, so if you can do better, great, pull requests are welcome.

@w4nderlust
Copy link

@bryevdv didn’t meant to offend anyone, sorry. My point was that I saw that before commenting on this thread and decided not to include it in my codebase, so having a working workaround didn’t really solve it for me (and doesn’t really solve the problem in general). I’ll gladly contribute if this was a python issue, unfortunately it is mostly a js callback one and on that side I can’t really help. No harm intended anyway, sorry again.

@bryevdv
Copy link
Member Author

bryevdv commented May 12, 2019

I think there is actually a simple solution that could work, namely adding a new value_throttled property, that is only updated on the JS side according to the throttle policy. Then if users want throttles response they can perform slider.on_change('value_throttled', ...). This does place a slight burden on users to use a different property for throttled response, but the alternative is that this issue for a valuable capability just languishes indefinitely. [1] I'm definitely OK with this compromise with examples and directly linkable docs support.

[1] This ability to distinguish events via two properties would actually be a useful feature in some cases.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants