Currently, repository and user search requests are triggered on nearly every keystroke in the search input field. When a user types quickly or frequently modifies the query, multiple overlapping API calls are sent to the GitHub API.
This behavior leads to inefficient API usage and degraded user experience.
Current Problems
During rapid typing, the application may experience:
- Excessive GitHub API requests on every keystroke
- Increased risk of hitting GitHub API rate limits
- Out-of-order responses causing UI flickering or stale data display
- Unnecessary network usage, especially on slow connections
- Reduced responsiveness during fast input changes
- Expected Behavior
The search system should behave in a controlled and optimized manner:
- API requests should only trigger after the user pauses typing (debounced input)
- Previous in-flight requests should be cancelled when a new query is entered
- Only the latest response should update the UI
- Optional: Ignore requests for very short or empty queries
- Proposed Solution
Implement optimized search request handling using the following techniques:
- Debouncing Input
Introduce a delay (300–500ms) before triggering API requests after user stops typing.
- Request Cancellation
Use AbortController (or Axios cancellation tokens if applicable) to cancel previous in-flight requests when a new search begins.
- Query Validation (Optional Improvement)
Prevent API calls for empty or very short inputs
Add minimum character threshold (e.g., 2–3 characters)
Implementing this fix will:
- Reduce unnecessary GitHub API calls
- Improve search responsiveness and UI smoothness
- Prevent stale or outdated results from rendering
- Reduce risk of hitting API rate limits
- Improve scalability of the application under heavy usage
Suggested Labels
gssoc26, level:critical, enhancement, frontend, enhancement
As a GSSoC contributor, I would like to work on this issue. Please assign it to me .
Currently, repository and user search requests are triggered on nearly every keystroke in the search input field. When a user types quickly or frequently modifies the query, multiple overlapping API calls are sent to the GitHub API.
This behavior leads to inefficient API usage and degraded user experience.
Current Problems
During rapid typing, the application may experience:
The search system should behave in a controlled and optimized manner:
Implement optimized search request handling using the following techniques:
Introduce a delay (300–500ms) before triggering API requests after user stops typing.
Use AbortController (or Axios cancellation tokens if applicable) to cancel previous in-flight requests when a new search begins.
Prevent API calls for empty or very short inputs
Add minimum character threshold (e.g., 2–3 characters)
Implementing this fix will:
Suggested Labels
gssoc26, level:critical, enhancement, frontend, enhancement
As a GSSoC contributor, I would like to work on this issue. Please assign it to me .