mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 17:26:03 +03:00
[GH-ISSUE #5556] [bug]: Search bar triggers API calls on every keystroke instead of using debounce #2143
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TZ-TawfiqSirajudeen on GitHub (Nov 3, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5556
Originally assigned to: @soumyamakkar on GitHub.
Is there an existing issue for this?
Platform
Web App
Browser
Chrome
Operating System
Windows
Bug Description
Bug Report: Search bar triggers API calls on every keystroke instead of using debounce
Description
The search bar currently sends an API request for every single keystroke the user types.
This results in excessive network calls, increased server load, and slower overall performance, especially for users on slower networks or with larger datasets.
A debounce mechanism should be implemented to delay the API call until the user stops typing for a short duration (e.g., 300–500ms). This will significantly improve performance and user experience.
Steps to Reproduce
Navigate to the page or component that includes the search bar.
Begin typing any query (e.g., “apple”).
Open the network tab in browser developer tools.
Observe that an API call is triggered on each keypress (e.g., typing “apple” results in 5 API calls).
Expected Behavior
The search input should use debounce to make only one API call after the user pauses typing for a short time (e.g., 300–500ms).
Actual Behavior
The application currently sends an API request on every keystroke, causing performance degradation and unnecessary server requests.
Impact
High number of redundant API requests
Increased load on backend services
Slower user interface response times
Poor user experience on slower connections
Suggested Fix
Implement a debounce function for the search input handler.
Example (using JavaScript/TypeScript):
let debounceTimer: ReturnType;
const handleSearchInput = (query: string) => {
clearTimeout(debounceTimer);
debounceTimer = setTimeout(() => {
fetchSearchResults(query);
}, 400); // delay in ms
};
Deployment Type
Hoppscotch Cloud
Version
No response
@soumyamakkar commented on GitHub (Nov 4, 2025):
Hi, can I work on this issue?
@soumyamakkar commented on GitHub (Nov 4, 2025):
I am unable to reproduce this bug. I only see an API call being made when I click on send. I have attached a screen recording below, please see if I am missing something.
https://github.com/user-attachments/assets/9fff0946-7dbe-4d58-ad4a-2dc06d2b1dfd
@nivedin commented on GitHub (Nov 5, 2025):
@soumyamakkar I believe the user was referring to the Spotlight search rather than the request URL input. Please confirm, @TZ-TawfiqSirajudeen.
@soumyamakkar commented on GitHub (Nov 5, 2025):
yes yes correct. I checked the issue in the spotlight search and was able to reproduce it..
@TZ-TawfiqSirajudeen commented on GitHub (Nov 5, 2025):
Hi @soumyamakkar Hope you find out the bug , here I mentioned the screenshot
@soumyamakkar commented on GitHub (Nov 8, 2025):
hi @nivedin , I’m able to reproduce this bug on the production site, but when I run Hoppscotch locally, the “Documentation” section doesn’t appear in the Spotlight search, so I can’t trigger the same API calls. Just want to confirm the best way to proceed before implementing the debounce fix.
@nivedin commented on GitHub (Nov 12, 2025):
Documentation search is a cloud-only feature. You could consider adding a debounced input here, which should fix the issue.
@soumyamakkar commented on GitHub (Nov 17, 2025):
Hi, I have raised the PR. Let me know if any changes are required.