capacitor-performance▌
cap-go/capgo-skills · updated Apr 8, 2026
Make your Capacitor apps fast and responsive.
Performance Optimization for Capacitor
Make your Capacitor apps fast and responsive.
When to Use This Skill
- User has slow app
- User wants to optimize
- User has memory issues
- User needs profiling
- User has janky animations
Quick Wins
1. Lazy Load Plugins
// BAD - All plugins loaded at startup
import { Camera } from '@capacitor/camera';
import { Filesystem } from '@capacitor/filesystem';
import { Geolocation } from '@capacitor/geolocation';
// GOOD - Load when needed
async function takePhoto() {
const { Camera } = await import('@capacitor/camera');
return Camera.getPhoto({ quality: 90 });
}
2. Reduce Bundle Size
# Analyze bundle
npx vite-bundle-visualizer
# Tree-shake imports
import { specific } from 'large-library'; // Good
import * as everything from 'large-library'; // Bad
3. Optimize Images
// Use appropriate quality
const photo = await Camera.getPhoto({
quality: 80, // Not 100
width: 1024, // Limit size
resultType: CameraResultType.Uri, // Not Base64
});
// Lazy load images
<img loading="lazy" src={url} />
4. Minimize Bridge Calls
// BAD - Multiple bridge calls
for (const item of items) {
await Storage.set({ key: item.id, value: item.data });
}
// GOOD - Single call with batch
await Storage.set({
key: 'items',
value: JSON.stringify(items),
});
Rendering Performance
Use CSS Transforms
/* GPU accelerated */
.animated {
transform: translateX(100px);
will-change: transform;
}
/* Avoid - triggers layout */
.animated {
left: 100px;
}
Virtual Scrolling
// Use virtual list for long lists
import { VirtualScroller } from 'your-framework';
<VirtualScroller
items={items}
itemHeight={60}
renderItem={(item) => <ListItem item={item} />}
/>
Debounce Events
import { debounce } from 'lodash-es';
const handleScroll = debounce((e) => {
// Handle scroll
}, 16); // ~60fps
Memory Management
Cleanup Listeners
import { App } from '@capacitor/app';
// Store listener handle
const handle = await App.addListener('appStateChange', callback);
// Cleanup on unmount
onUnmount(() => {
handle.remove();
});
Avoid Memory Leaks
// Clear large data when done
let largeData = await fetchLargeData();
processData(largeData);
largeData = null; // Allow GC
Profiling
Chrome DevTools
- Connect via chrome://inspect
- Performance tab > Record
- Analyze flame chart
Xcode Instruments
- Product > Profile
- Choose Time Profiler
- Analyze hot paths
Android Profiler
- View > Tool Windows > Profiler
- Select CPU/Memory/Network
- Record and analyze
Metrics to Track
| Metric | Target |
|---|---|
| First Paint | < 1s |
| Time to Interactive | < 3s |
| Frame Rate | 60fps |
| Memory | Stable, no growth |
| Bundle Size | < 500KB gzipped |
Resources
- Chrome DevTools: https://developer.chrome.com/docs/devtools
- Xcode Instruments: https://developer.apple.com/instruments
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★59 reviews- ★★★★★Dhruvi Jain· Dec 24, 2024
I recommend capacitor-performance for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Kaira Li· Dec 20, 2024
Keeps context tight: capacitor-performance is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Ama Chen· Dec 20, 2024
capacitor-performance is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Chen Johnson· Dec 16, 2024
capacitor-performance reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Omar Sanchez· Dec 12, 2024
capacitor-performance has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Chen Smith· Dec 12, 2024
Keeps context tight: capacitor-performance is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Oshnikdeep· Nov 15, 2024
capacitor-performance fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Ishan Ndlovu· Nov 11, 2024
Useful defaults in capacitor-performance — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Chen Malhotra· Nov 7, 2024
Registry listing for capacitor-performance matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Kaira Chawla· Nov 3, 2024
Solid pick for teams standardizing on skills: capacitor-performance is focused, and the summary matches what you get after install.
showing 1-10 of 59