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

Configurable debounce delay #436

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kvalev
Copy link

@kvalev kvalev commented Oct 12, 2021

Allow the users to configure the debounce delay, which might be helpful when querying an externalGeocoder.

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • run npm run docs and commit changes to API.md
  • update CHANGELOG.md with changes under master heading before merging

@kvalev kvalev force-pushed the kvv-configurable-debounce branch from a537afc to 5697fcf Compare October 12, 2021 19:41
@andrewharvey
Copy link
Collaborator

Thanks for the PR. My view is per #185 we shouldn't be using debounce at all and instead use throttle. I'd like to see more thought and discussion and ultimately a decision on this point before we go adding to the API. If we add this to the API now then swap to throttle it would be a breaking change which is something we should try to avoid.

@andrewharvey andrewharvey mentioned this pull request Oct 18, 2021
@wibed
Copy link

wibed commented Dec 26, 2022

Thanks for the PR. My view is per #185 we shouldn't be using debounce at all and instead use throttle. I'd like to see more thought and discussion and ultimately a decision on this point before we go adding to the API. If we add this to the API now then swap to throttle it would be a breaking change which is something we should try to avoid.

throttling would fire the first event and then wait for a given time until the next event fires.
debounce would cancel events until a threshold has been met.

a debounce would be helpful to make the first event as late as possible, while throttle would prevent the app to fire repeatedly within a given period.

why not both?

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.

3 participants