A shared folder with AI prompts and code snippets
From workspace: a0.dev
Team: Main
Total snippets: 5
5 snippets
Use virtualization or list chunking to speed up rendering for large lists.
This list renders thousands of items and causes slow performance: [Paste list rendering code] Help me implement virtualization or optimize the list rendering efficiently.
Delay non-critical scripts and reduce blocking resources for faster load.
The initial page load is slow. Analyze possible performance bottlenecks. Suggest how to lazy-load non-critical resources and optimize bundle size.
Prevent performance issues by debouncing input-related tasks like filtering or API calls.
I have an input field that triggers an expensive operation on every keystroke: [Paste input or component code] Add a debounce mechanism so it only triggers after the user stops typing.
Reduce unnecessary re-renders by using memoization or callback optimizations.
This component is re-rendering too often and slowing down performance: [Paste component code] Analyze it and optimize with memo, useMemo, or useCallback where appropriate.
Load images only when they enter the viewport to reduce initial payload.
Optimize image loading using lazy loading. Example: Replace standard <img> with a lazy-loading implementation that supports placeholder blur and responsive behavior.