Mobile Performance logo

Mobile Performance

Community
Omar-Obando
mobile-performance

Mobile app performance optimization, startup time, memory management, and battery efficiency

Overview

PublisherOmar-Obando
Repositoryqwen-orchestrator
Skill namemobile-performance
Stars
53
Forks
13
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Omar-Obando on GitHub. Read the source before you install it.

Installation

Install the Mobile Performance AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/mobile-performance
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Mobile Performance in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Mobile Performance on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Mobile Performance is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Frequently asked questions

What does the Mobile Performance AI skill do?

Mobile app performance optimization, startup time, memory management, and battery efficiency

Why use Mobile Performance on TypingMind?

Because you install it once and use it with any model. Mobile Performance is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Mobile Performance in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/mobile-performance. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Mobile Performance?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Mobile Performance?

As many as you like. As long as a model supports skills, you can use Mobile Performance with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Mobile Performance AI skill free?

Yes. It is published on GitHub by Omar-Obando under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇