# What are the best practices to improve LWC performance?

**Topic:** Development · **Difficulty:** Medium · **Tags:** lwc, performance, best-practices

Read it on the site: https://www.forcechallenges.com/interview-questions/what-are-the-best-practices-to-improve-lwc-performance

## Answer

- Prefer **Lightning Data Service** and cacheable `@wire` calls to avoid redundant server trips.
- Fetch only needed fields and records; paginate large lists.
- Use `lwc:if` to avoid rendering hidden content, and lazy-load heavy children.
- Provide stable **keys** in `for:each` for efficient diffing.
- Avoid heavy logic in getters (they run on each render) and avoid DOM manipulation in `renderedCallback`.
- Debounce user input handlers (e.g. search).
- Don't mutate reactive properties unnecessarily to prevent extra re-renders.
- Load third-party scripts once and bundle assets as static resources.
- Clean up listeners and subscriptions in `disconnectedCallback`.

---
Source: ForceChallenges · last updated 2026-10-19
