Skip to content

Fix(Performance): Debounce search input to avoid expensive re-filtering #1677

Description

@Abhi666-max

The Problem

In frontend/src/pages/Findings.tsx, the search input currently updates searchQuery on every single keystroke. This immediately drives the filteredFindings computation and list updates, which can cause excessive re-renders and laggy typing UI on larger datasets.

Proposed Solution

I will implement a standard debounce mechanism to optimize the search filter (taking around 10-15 lines of React code):

  1. Add a debouncedQuery state.
  2. Implement a useEffect with a setTimeout (e.g., 300ms) to delay the state update, cleaning up the timeout on unmount.
  3. Update the filtering logic to depend on debouncedQuery rather than the raw searchQuery.

Assignment

I am a GSSoC '26 contributor. Could you please assign this optimization task to me and add the relevant labels (gssoc, gssoc-approved, enhancement)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions