Logo van Mobile Performance

Mobile Performance

Community
Omar-Obando
mobile-performance

Optimalisatie van de prestaties, opstarttijd, geheugenbeheer en batterij-efficiëntie van mobiele apps

Add to TypingMind

Overzicht

UitgeverOmar-Obando
Repositoryqwen-orchestrator
Skillnaammobile-performance
Sterren
53
Forks
13
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door Omar-Obando op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Mobile Performance in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/mobile-performance
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Omar-Obando/qwen-orchestrator.git /tmp/qwen-orchestrator
mkdir -p .claude/skills
cp -r /tmp/qwen-orchestrator/skills/mobile-performance .claude/skills/mobile-performance
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Mobile Performance in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Mobile Performance automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Mobile Performance niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Mobile Performance Optimization

When to Use

  • Optimizing mobile app startup time
  • Reducing memory footprint and preventing leaks
  • Improving scroll performance and frame rates
  • Optimizing battery consumption
  • Reducing app bundle size
  • Implementing lazy loading for mobile resources
  • Optimizing image loading and caching strategies
  • Improving network request efficiency on mobile
  • Reducing jank and stuttering in animations
  • Optimizing database queries on mobile devices
  • Implementing efficient state management
  • Reducing cold/warm start times
  • Optimizing rendering pipeline
  • Implementing efficient list/virtualization patterns
  • Reducing memory allocations in hot paths
  • Optimizing JavaScript execution on mobile
  • Implementing efficient caching strategies
  • Reducing main thread blocking operations
  • Optimizing image decoding and processing
  • Implementing efficient animation systems
  • Reducing layout thrashing
  • Optimizing touch response times
  • Implementing efficient background task handling

When NOT to Use

  • Desktop web performance optimization (use performance skill instead)
  • Server-side rendering optimization (use serverless-optimization skill)
  • API endpoint performance (use api-design skill)
  • Database server optimization (use database-design skill)
  • Network infrastructure optimization
  • CDN configuration and optimization
  • Web worker optimization for desktop
  • WebGL/WebGPU performance tuning
  • Progressive Web App caching strategies
  • Service worker optimization
  • HTTP/2 or HTTP/3 configuration
  • Server push optimization
  • Critical CSS generation for web
  • Font loading optimization for web
  • Preload/prefetch hint optimization

Prerequisites

  • Understanding of mobile app architecture (React Native, Flutter, or native)
  • Knowledge of mobile device constraints (memory, CPU, battery)
  • Familiarity with mobile profiling tools
  • Understanding of mobile network conditions (3G, 4G, 5G, offline)
  • Experience with mobile-specific performance metrics

Performance Metrics

Core Mobile Metrics

MetricTargetMeasurement Tool
Time to Interactive (TTI)< 3s (4G), < 8s (3G)Chrome DevTools, Lighthouse
First Contentful Paint (FCP)< 1.8sChrome DevTools, Web Vitals
Largest Contentful Paint (LCP)< 2.5sChrome DevTools, Web Vitals
First Input Delay (FID)< 100msChrome DevTools, Web Vitals
Cumulative Layout Shift (CLS)< 0.1Chrome DevTools, Web Vitals
Total Blocking Time (TBT)< 300msChrome DevTools, Lighthouse
Memory Usage< 150MB (iOS), < 200MB (Android)Xcode Instruments, Android Profiler
Battery Impact< 5% per hourDevice battery stats, battery-historian
Frame Rate60fps (target), 120fps (high refresh)FPS counter, Performance Monitor
App Bundle Size< 50MB (initial), < 100MB (total)App Store Connect, Play Console

Mobile-Specific Metrics

MetricDescriptionTarget
Jank RatePercentage of dropped frames< 1%
Touch Response TimeTime from touch to visual feedback< 100ms
Scroll SmoothnessConsistency of scroll frame rate60fps sustained
Memory Leak RateMemory growth per navigation cycle0MB growth
Network Request TimeAverage request completion time< 500ms (cached), < 2s (network)
Image Load TimeTime to display optimized images< 1s
Animation Frame BudgetTime available per frame16.67ms (60fps)

Startup Time Optimization

Cold Start Optimization

javascript
// ❌ BAD: Heavy operations during startup
class App extends Component {
  componentDidMount() {
    // All these block startup
    this.loadUserData();
    this.initializeAnalytics();
    this.fetchNotifications();
    this.syncLocalDatabase();
    this.preloadImages();
  }
}

// ✅ GOOD: Prioritized, async startup
class App extends Component {
  componentDidMount() {
    // Phase 1: Show splash screen immediately
    this.showSplashScreen();

    // Phase 2: Critical initialization (parallel)
    Promise.all([
      this.initializeCoreServices(),
      this.loadUserPreferences(),
    ]).then(() => {
      // Phase 3: Navigate to main screen
      this.navigateToMainScreen();

      // Phase 4: Background tasks (non-blocking)
      this.initializeAnalytics();
      this.fetchNotifications();
      this.syncLocalDatabase();
    });
  }
}

React Native Startup Optimization

javascript
// App.js - Optimized startup
import React, { lazy, Suspense } from 'react';
import { ActivityIndicator, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';

// Lazy load heavy screens
const Dashboard = lazy(() => import('./screens/Dashboard'));
const Settings = lazy(() => import('./screens/Settings'));
const Profile = lazy(() => import('./screens/Profile'));

const LazyScreen = ({ screen }) => (
  <Suspense
    fallback={
      <View style={styles.loadingContainer}>
        <ActivityIndicator size="large" />
      </View>
    }
  >
    {screen}
  </Suspense>
);

export default function App() {
  return (
    <NavigationContainer>
      {/* Heavy screens are only loaded when navigated to */}
      <Stack.Screen
        name="Dashboard"
        component={() => <LazyScreen screen={<Dashboard />} />}
      />
      <Stack.Screen
        name="Settings"
        component={() => <LazyScreen screen={<Settings />} />}
      />
      <Stack.Screen
        name="Profile"
        component={() => <LazyScreen screen={<Profile />} />}
      />
    </NavigationContainer>
  );
}

Flutter Startup Optimization

dart
// main.dart - Optimized startup
import 'package:flutter/material.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Pre-warm cache in background
  DefaultCacheManager().getFileFromCache('banner.jpg').then((_) {
    // Cache warmed, navigate to main app
  });

  // Initialize services without blocking
  unawaited(initializeAnalytics());
  unawaited(syncLocalDatabase());

  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _isLoading = true;

  @override
  void initState() {
    super.initState();
    // Show splash, load critical data
    loadCriticalData().then((_) {
      setState(() {
        _isLoading = false;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    if (_isLoading) {
      return const SplashScreen();
    }
    return const MainApp();
  }
}

Memory Optimization

Prevent Memory Leaks

javascript
// ❌ BAD: Memory leak from event listeners
class Component extends React.Component {
  componentDidMount() {
    EventEmitter.on('data', this.handleData);
    setInterval(this.pollData, 5000);
  }

  // Missing cleanup!

  render() {
    return <View />;
  }
}

// ✅ GOOD: Proper cleanup
class Component extends React.Component {
  componentDidMount() {
    EventEmitter.on('data', this.handleData);
    this.intervalId = setInterval(this.pollData, 5000);
  }

  componentWillUnmount() {
    EventEmitter.off('data', this.handleData);
    clearInterval(this.intervalId);
  }

  render() {
    return <View />;
  }
}

Image Memory Management

javascript
// React Native - Image optimization
import FastImage from 'react-native-fast-image';
import {Image} from 'react-native';

// Predefine image sizes
const IMAGE_SIZES = {
  thumbnail: {width: 100, height: 100},
  medium: {width: 400, height: 300},
  large: {width: 800, height: 600},
};

// Use FastImage with caching
const OptimizedImage = ({uri, size = 'medium'}) => (
  <FastImage
    source={{
      uri,
      priority: FastImage.priority.normal,
      // Cache control
      cache: FastImage.cacheControl.cacheOnly,
    }}
    style={{
      width: IMAGE_SIZES[size].width,
      height: IMAGE_SIZES[size].height,
    }}
    resizeMode={FastImage.resizeMode.cover}
  />
);

// Flutter - Image optimization
import 'package:cached_network_image/cached_network_image.dart';

Widget optimizedImage(String url) {
  return CachedNetworkImage(
    imageUrl: url,
    // Memory cache settings
    memCacheWidth: 400, // Constrain memory cache
    memCacheHeight: 300,
    // Disk cache
    fadeInDuration: Duration(milliseconds: 300),
    placeholder: (context, url) => CircularProgressIndicator(),
    errorWidget: (context, url, error) => Icon(Icons.error),
  );
}

Scroll Performance

Virtualized Lists

javascript
// React Native - FlatList optimization
import {FlatList} from 'react-native';

const OptimizedList = ({items}) => (
  <FlatList
    data={items}
    renderItem={RenderItem}
    // Key optimizations
    keyExtractor={item => item.id}
    initialNumToRender={10}          // Render first 10 items
    maxToRenderPerBatch={5}          // Batch size for subsequent renders
    windowSize={5}                   // Number of screens to render
    removeClippedSubviews={true}     // Remove off-screen views (Android)
    // Performance optimizations
    getItemLayout={(data, index) => ({
      length: ITEM_HEIGHT,
      offset: ITEM_HEIGHT * index,
      index,
    })}
    // Remove layout calculation
    onEndReachedThreshold={0.5}      // Load more at 50% from end
    onEndReached={() => loadMore()}
    // Memoize render
    renderItem={({item}) => <MemoizedItem item={item}/>}
  />
);

// Flutter - ListView optimization
import 'package:flutter_slidable/flutter_slidable.dart';

Widget optimizedList(List<Item> items) {
  return ListView.builder(
    // Pre-calculate item count
    itemCount: items.length,
    // Use builder pattern
    itemBuilder: (context, index) {
      final item = items[index];
      return ListTile(
        key: ValueKey(item.id), // Stable key
        title: Text(item.title),
        subtitle: Text(item.subtitle),
        leading: CircleAvatar(child: Text(item.initial)),
      );
    },
    // Optimize scrolling
    cacheExtent: 500.0, // Pre-render 500px ahead
    addAutomaticKeepAlives: true, // Keep item state
    addRepaintBoundaries: true,   // Isolate repaints
  );
}

Battery Optimization

Reduce Background Activity

javascript
// React Native - Battery-efficient polling
import { AppState } from 'react-native';

class BatteryEfficientComponent extends Component {
  state = { appState: AppState.currentState };

  componentDidMount() {
    this.appStateSubscription = AppState.addEventListener(
      'change',
      this.handleAppStateChange
    );

    // Only poll when app is in foreground
    if (this.state.appState === 'active') {
      this.startPolling();
    }
  }

  handleAppStateChange = (nextAppState) => {
    if (this.state.appState === 'active' && nextAppState === 'inactive') {
      this.stopPolling(); // App went to background
    } else if (nextAppState === 'active') {
      this.startPolling(); // App came to foreground
    }
    this.setState({ appState: nextAppState });
  };

  componentWillUnmount() {
    this.appStateSubscription?.remove();
    this.stopPolling();
  }
}

Bundle Size Optimization

Code Splitting

javascript
// React Native - Dynamic imports
import React, { lazy, Suspense } from 'react';

// Split by feature
const ChatFeature = lazy(() => import('./features/Chat'));
const PaymentFeature = lazy(() => import('./features/Payment'));
const SettingsFeature = lazy(() => import('./features/Settings'));

// Split by route
const Dashboard = lazy(() => import('./screens/Dashboard'));
const Profile = lazy(() => import('./screens/Profile'));

// Split by platform
const PlatformSpecific = lazy(() =>
  Platform.OS === 'ios'
    ? import('./components/IOSComponent')
    : import('./components/AndroidComponent')
);

Tree Shaking

javascript
// ❌ BAD: Import entire library
import _ from 'lodash';
_.debounce(() => {});

// ✅ GOOD: Import only what you need
import debounce from 'lodash/debounce';

Profiling Tools

React Native

ToolPurposeURL
React DevToolsComponent hierarchy, render timinghttps://facebook.github.io/react-native/react-devtools
Hermes ProfilerJavaScript execution profilingBuilt into React Native
FlipperNetwork, layout, plugin debugginghttps://fbflipper.com
Android ProfilerMemory, CPU, networkAndroid Studio
InstrumentsMemory leaks, energy impactXcode

Flutter

ToolPurposeURL
Flutter DevToolsPerformance, memory, networkhttps://docs.flutter.dev/tools/devtools
TimelineFrame rendering analysisBuilt into Flutter
Memory ViewHeap analysisFlutter DevTools
Network ViewRequest monitoringFlutter DevTools

Production Checklist

  • App startup time < 3s on mid-range device
  • Memory usage < 150MB (iOS), < 200MB (Android)
  • No memory leaks detected (profile 30min session)
  • Scroll performance 60fps sustained
  • Touch response < 100ms
  • Battery impact < 5% per hour
  • Bundle size < 50MB (initial download)
  • Images optimized and cached
  • Network requests batched and cached
  • Background tasks respect app state
  • Animations use native driver
  • Lists are virtualized
  • No jank during navigation
  • Tested on 3G network conditions
  • Offline mode functional
  • Memory profiling shows no leaks
  • Frame rate consistent during animations
  • Touch targets meet accessibility guidelines

References

Veelgestelde vragen

Wat doet de AI-skill Mobile Performance?

Optimalisatie van de prestaties, opstarttijd, geheugenbeheer en batterij-efficiëntie van mobiele apps

Waarom Mobile Performance gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Mobile Performance bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Mobile Performance in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/mobile-performance. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Mobile Performance gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Mobile Performance gebruiken?

Zoveel als je wilt. Je kunt Mobile Performance gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Mobile Performance gratis?

Ja. Deze skill is door Omar-Obando op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇