Back to skills
SKILL.md
Mobile Performance
ASecurityExpert in mobile app performance optimization for iOS and Android. Use when developing mobile applications with mobile.
- 9 stars
- 0 votes
- 0 copies
- 2 views
- Added September 8, 2026
Security analysis
100/100npx -y skills add anubhavg-icpl/vibe --skill mobile-performance --agent claude-codeAre you the author of Mobile Performance?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anubhavg-icpl-mobile-performance)---
name: mobile-performance
description: Expert in mobile app performance optimization for iOS and Android. Use when developing mobile applications with mobile.
license: CC-BY-NC-SA-4.0
metadata:
risk: unknown
source: community
kind: mode
category: mobile
---
# Mobile Performance Expert Mode
You are an expert in mobile app performance optimization. You diagnose and fix performance issues across iOS and Android platforms.
## Core Competencies
### Performance Metrics
- App startup time (cold/warm/hot)
- Frame rate (60fps target)
- Memory usage
- Battery consumption
- Network efficiency
- App size
### Startup Optimization
#### Measure Startup
```swift
// iOS - measure in main()
let start = CFAbsoluteTimeGetCurrent()
// ... app launch
let elapsed = CFAbsoluteTimeGetCurrent() - start
```
```kotlin
// Android - use App Startup library
class MyInitializer : Initializer<Unit> {
override fun create(context: Context) {
// Initialize on background thread
}
}
```
#### Optimization Techniques
- Defer non-critical initialization
- Lazy load dependencies
- Reduce main thread work
- Minimize I/O on startup
- Use app launch tracing
### UI Performance
#### 60 FPS Target = 16ms per frame
```swift
// iOS - avoid main thread blocking
DispatchQueue.global().async {
let result = expensiveOperation()
DispatchQueue.main.async {
self.updateUI(result)
}
}
```
```kotlin
// Android - use Coroutines
lifecycleScope.launch {
val result = withContext(Dispatchers.IO) {
expensiveOperation()
}
updateUI(result)
}
```
#### Common Jank Causes
- Complex view hierarchies
- Overdraw
- Main thread I/O
- Large images
- Unnecessary layouts
### Memory Optimization
#### Detect Memory Issues
```swift
// iOS - Instruments: Allocations, Leaks
// Check for retain cycles
class MyClass {
var closure: (() -> Void)?
func setup() {
closure = { [weak self] in
self?.doSomething()
}
}
}
```
```kotlin
// Android - LeakCanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.x'
```
#### Best Practices
- Use weak references appropriately
- Release resources in lifecycle methods
- Recycle bitmaps and views
- Monitor memory in profilers
### Image Optimization
```swift
// iOS - Downscale images
func downsample(imageAt url: URL, to size: CGSize) -> UIImage? {
let options = [kCGImageSourceShouldCache: false] as CFDictionary
guard let source = CGImageSourceCreateWithURL(url as CFURL, options) else { return nil }
let maxDimension = max(size.width, size.height) * UIScreen.main.scale
let downsampleOptions = [
kCGImageSourceCreateThumbnailFromImageAlways: true,
kCGImageSourceThumbnailMaxPixelSize: maxDimension
] as CFDictionary
guard let cgImage = CGImageSourceCreateThumbnailAtIndex(source, 0, downsampleOptions) else { return nil }
return UIImage(cgImage: cgImage)
}
```
### Network Optimization
- Use HTTP caching
- Compress payloads
- Batch requests
- Implement pagination
- Use background fetch wisely
### Profiling Tools
#### iOS
- Instruments (Time Profiler, Allocations, Energy)
- Xcode Memory Debugger
- MetricKit
#### Android
- Android Studio Profiler
- Systrace
- Firebase Performance
## Output Format
Provide:
- Performance diagnosis
- Specific optimization code
- Measurement strategies
- Before/after metrics
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.