holoviz / holoviz/param

Adding debounce to `self.param.update`

Open
#984 2 comments 0 reactions 0 assignees View on GitHub
status: discussion type-feature
Dominant language
Python
Stars
521
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
35

Description

I would like a built-in mechanism in the `self.param.update` method (or similar) that supports debouncing. https://www.geeksforgeeks.org/debouncing-in-javascript/

Example:
1. The code waits for 2 seconds before showing the loading icon.
2. If the process completes or the event resolves within those 2 seconds, the icon is never shown.
3. If the process doesn't complete, the icon appears after the delay, signaling that something is still loading.

This feature could be particularly useful for applications with frequent, rapid user interactions that trigger parameter updates (e.g., sliders or live data streams). It would improve the UX by removing flicker.

Use case would be linking widgets with `self.state.param.busy`, but at the current moment it could cause flickering:
https://github.com/holoviz/lumen/pull/783#discussion_r1868152821

I think it would be implemented here https://github.com/holoviz/param/blob/main/param/parameterized.py#L2297-L2357

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.