Important: Despia runs on WKWebView (iOS) and Android WebView with optimized caching and performance tuning. If your Despia app is slow, your web app is likely slow too. These are deeper web performance issues, not Despia-specific problems.
First: Profile your app
Before fixing anything, measure the problem. Chrome DevTools (for web version):- Open your app in Chrome
- Open DevTools (F12)
- Go to Performance tab
- Click Record, interact with your app, click Stop
- Look for:
- Long tasks (yellow bars > 50ms)
- Layout thrashing (purple bars)
- Memory spikes (Memory tab)
- Install React DevTools extension
- Go to Profiler tab
- Click Record, interact, Stop
- Look for components rendering too often
Memory leaks
The most common cause of slow apps over time.Symptoms
- App gets slower the longer it runs
- Memory usage keeps increasing
- Crashes after extended use
- Laggy scrolling that gets worse
Common causes
Event listeners not cleaned up:How to find leaks
Chrome DevTools Memory tab:- Take heap snapshot
- Interact with your app
- Take another snapshot
- Compare snapshots
- Look for objects that keep growing
Too many re-renders
React/Vue apps rendering unnecessarily.Symptoms
- UI feels laggy during interactions
- Input fields lag when typing
- Scrolling stutters
- DevTools shows many renders
Common causes
State in wrong place:How to find
React DevTools Profiler shows which components render and why.Large bundle sizes
App takes forever to load initially.Symptoms
- First load takes 5+ seconds
- Large network transfer in DevTools
- Slow on 3G/4G connections
Solutions
Code splitting:- Duplicate dependencies
- Huge libraries you barely use
- Unoptimized images in bundle
Unoptimized images
Images killing your app performance.Symptoms
- Slow scrolling in image-heavy lists
- High memory usage
- Long initial load times
Solutions
Lazy load images:- WebP instead of JPEG/PNG (smaller file size)
- AVIF if browser support allows (even smaller)
Too many DOM nodes
Rendering huge lists kills performance.Symptoms
- Scrolling through long lists is laggy
- Initial render of list takes seconds
- Memory usage spikes with large lists
Solution: Virtualization
Only render visible items:react-window- Simple, lightweightreact-virtualized- More features, heavier@tanstack/virtual- Framework agnostic
Main thread blocking
Heavy computations freezing the UI.Symptoms
- UI freezes during operations
- Buttons don’t respond immediately
- Animations stutter during processing
Solutions
Debounce expensive operations:CSS performance
CSS causing reflows and repaints.Symptoms
- Scrolling feels janky
- Animations stutter
- Layout shifts during interactions
Common issues
Animating expensive properties:Network performance
Too many requests or slow API calls.Symptoms
- Data takes forever to load
- Multiple loading spinners
- Network tab shows waterfall of requests
Solutions
Batch API requests:Production mistakes
Common issues specific to production builds. Console.log statements:Still slow?
If you’ve tried everything and the app is still slow:- Profile in production build - Dev builds are always slower
- Test on real devices - Desktop Chrome != iPhone
- Check Despia runtime version - Update to latest
- Simplify the UI - Maybe you’re just trying to do too much
- Profile your app and share results
- Contact support: support@despia.com
- Include: Device, OS version, Despia runtime version
Remember
Despia is fast. WebViews are fast. If your app is slow, it’s probably:- Memory leaks (most common)
- Too many re-renders
- Unoptimized images
- Large bundle size
- Main thread blocking
- Poor network strategy