Skip to main content
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):
  1. Open your app in Chrome
  2. Open DevTools (F12)
  3. Go to Performance tab
  4. Click Record, interact with your app, click Stop
  5. Look for:
    • Long tasks (yellow bars > 50ms)
    • Layout thrashing (purple bars)
    • Memory spikes (Memory tab)
React DevTools Profiler: If using React:
  1. Install React DevTools extension
  2. Go to Profiler tab
  3. Click Record, interact, Stop
  4. Look for components rendering too often
The app is only as fast as your slowest part. Find it first.

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:
Timers not cleared:
Closures holding references:
DOM nodes not garbage collected:

How to find leaks

Chrome DevTools Memory tab:
  1. Take heap snapshot
  2. Interact with your app
  3. Take another snapshot
  4. Compare snapshots
  5. Look for objects that keep growing
Check for detached DOM nodes: In Memory snapshot, filter for “Detached”. If you see hundreds/thousands, you have a leak.

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:
Missing React.memo:
Not using useMemo for expensive computations:
Creating new objects/functions every render:

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:
Tree shaking imports:
Check bundle size:
Look for:
  • 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:
Optimize image sizes:
Use modern formats:
  • 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:
Libraries:
  • react-window - Simple, lightweight
  • react-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:
Use Web Workers for heavy processing:
Break up long tasks:

CSS performance

CSS causing reflows and repaints.

Symptoms

  • Scrolling feels janky
  • Animations stutter
  • Layout shifts during interactions

Common issues

Animating expensive properties:
Forcing layout thrashing:
Complex selectors:

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:
Cache API responses:
Prefetch critical data:

Production mistakes

Common issues specific to production builds. Console.log statements:
Remove all console.log or use a logging library that can be disabled in production. Development mode in production: Check your build process isn’t using development mode:
Source maps in production: Source maps are huge and slow down loading. Don’t ship them to users.

Still slow?

If you’ve tried everything and the app is still slow:
  1. Profile in production build - Dev builds are always slower
  2. Test on real devices - Desktop Chrome != iPhone
  3. Check Despia runtime version - Update to latest
  4. Simplify the UI - Maybe you’re just trying to do too much
Get help:
  • 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:
  1. Memory leaks (most common)
  2. Too many re-renders
  3. Unoptimized images
  4. Large bundle size
  5. Main thread blocking
  6. Poor network strategy
Fix your web app first. Then it’ll be fast in Despia too.