Skip to content

feat: debounce search input to improve performance#111

Open
Utkarsha155 wants to merge 1 commit into
data-umbrella:mainfrom
Utkarsha155:debounce-search
Open

feat: debounce search input to improve performance#111
Utkarsha155 wants to merge 1 commit into
data-umbrella:mainfrom
Utkarsha155:debounce-search

Conversation

@Utkarsha155
Copy link
Copy Markdown

Pull Request description

This PR introduces a debounce mechanism for the search input in SearchBar.jsx to improve performance.

Currently, the search input triggers filtering on every keystroke, which can lead to unnecessary computations and UI updates. This change ensures that filtering only occurs after the user pauses typing (300ms delay), reducing redundant operations and improving responsiveness.

Solves #110


How to test these changes

  • run npm run dev

  • open http://localhost:5173/du-event-board/

  • type quickly in the search bar (e.g., "python")

  • observe that filtering happens after a short delay instead of every keystroke

  • run npm test

  • ensure all tests pass successfully


Pull Request checklists

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

  • I have reviewed the changes and it contains no misspelling.
  • The code is well commented, especially in the parts that contain more complexity.
  • New and old tests passed locally.

Additional information

  • Debounce delay: 300ms
  • Added test-safe logic to ensure compatibility with existing tests
  • No changes to existing functionality or UI behavior

Reviewer's Checklist

  • I managed to reproduce the problem locally from the main branch
  • I managed to test the new changes locally
  • I confirm that the issues mentioned were fixed/resolved.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 29, 2026

Deploy Preview for dueventboard ready!

Name Link
🔨 Latest commit 750292e
🔍 Latest deploy log https://app.netlify.com/projects/dueventboard/deploys/69d753fb5be20f00081ed20c
😎 Deploy Preview https://deploy-preview-111--dueventboard.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@yuvimittal
Copy link
Copy Markdown
Contributor

@Utkarsha155 , LGTM ...please rebase your branch

@Utkarsha155
Copy link
Copy Markdown
Author

@Utkarsha155 , LGTM ...please rebase your branch

Hi @yuvimittal ,

Thanks for the review.

I have rebased the branch with the latest main and resolved the conflicts.
All checks are now passing and the branch is up to date.

Please let me know if anything else needs to be updated.

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.

2 participants