loading all 400,000 records into memory for autocomplete is not feasible. The best practice for large datasets is to implement server-side search (sometimes called “remote filtering” or “typeahead”), where the frontend queries the backend for matching results as the user types, and only a small subset (e.g., 10–100 records) is returned and displayed.