optimize-search
Reactive icon

Optimize Search

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 5 Jan (3 days ago)
 by 
Eone Technologies Private Limited
0.0
 (0 ratings)
optimize-search

Optimize Search

Documentation
1.0.0

In OutSystems applications, search inputs are often connected to Server Actions, Aggregate queries, or REST API calls. Triggering these operations on every keystroke can lead to excessive server requests, increased database load, and a degraded user experience.

To address this, a debounce pattern is implemented on the client side. With debounce, the execution of search logic is intentionally delayed until the user pauses typing for a short, configurable duration (for example, 300–500 milliseconds). This ensures that the system responds only after the user has finished entering input, rather than reacting to every individual keystroke.

Input Fileds:
Placeholder

Used to define the prompt text displayed inside the input field.
This helps guide users on what they can search for (for example, “Search by name or ID”).
The text disappears automatically when the user starts typing.

Delay In Time (Milliseconds)

Specifies the debounce delay in milliseconds before the search logic is triggered.
The search is executed only after the user stops typing for the defined duration.

  • Example:
    300 → search triggers after 300 ms of inactivity
    500 → recommended for API-based searches

This helps reduce unnecessary Server Action, REST API, and database calls.

Is Enable (Optional)

Controls whether the Input Widget is enabled or disabled.

  • True → Input field is active and accepts user input

  • False → Input field is disabled and cannot be edited

    This is useful for scenarios such as:

  • Read-only screens

  • Conditional enablement based on user role or screen state
    Length Of Input (Optional)
    Defines the minimum number of characters required before triggering the search logic.
    The search process starts only when the user input length meets or exceeds this value.

    • Example:
      3 → search triggers only after 3 characters are entered

  • This further optimizes performance by preventing searches on very short or incomplete input.

  • A Client Action is triggered when the user types into a search input.

  • Instead of immediately calling a Server Action, the client-side logic waits for the defined debounce interval.

  • If the user continues typing within this interval, the timer resets.

  • Once the user stops typing and the delay expires, the search logic is executed.

Benefits

  • Reduced Server Calls
    Server Actions are executed only when necessary, avoiding redundant requests.

  • Optimized REST Integrations
    External API calls are minimized, reducing latency and integration costs.

  • Lower Database Load
    Aggregates and SQL queries run fewer times, improving overall system performance.

  • Improved User Experience
    Search results feel faster and more responsive, without unnecessary UI refreshes.

  • Better Scalability
    The application can handle more concurrent users with less infrastructure strain.


When to Use Debounce 

  • Search-as-you-type functionality

  • Autocomplete inputs

  • Filters that trigger server-side logic

  • Any UI interaction that could generate frequent backend calls

    These parameters work together to deliver an optimized and user-friendly search experience in OutSystems.By combining debounce delay, minimum input length, and optional enablement, the solution minimizes backend load while providing fast and responsive search behavior.