Performance Optimization

A shared folder with AI prompts and code snippets

From workspace: a0.dev

Team: Main

Total snippets: 5

a0.dev

Performance Optimization

5 snippets

Analyze Slow Rendering List

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.

Improve Initial Page Load Time

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.

Debounce Expensive Input Operations

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.

Optimize React Component Re-renders

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.

Use Lazy Loading for Images

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.

a0.dev - Performance Optimization - AI Prompts & Code Snippets | Snippets AI