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

Added simple debouncing to search suggestions to reduce queries while user is typing #1280

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

dmitrymatio
Copy link
Collaborator

@dmitrymatio dmitrymatio commented Jan 10, 2023

Description

This is a simple debouncing fix to reduce number of queries made as a result of queries made onchange of input bar.
500ms delays between attempts seemed to be a decent middle ground between reducing queries and the user experience.

Currently logging query count to console for testing.

Related Issue

Motivation and Context

We're worried about exceeding our Algolia plan's budget for actions which primarily consists of multi index queries.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@timkim timkim merged commit 1796c51 into main Jan 11, 2023
@timkim timkim deleted the fix-search-query-on-type-with-debounce branch January 11, 2023 00:05
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.

None yet

2 participants