スキル一覧に戻る
AVRA-CADAVRA

performance-optimization-guide

by AVRA-CADAVRA

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: performance-optimization-guide description: Guides performance optimization: atomic clock service, performance monitoring, memory optimization, battery optimization. Use when optimizing performance, monitoring metrics, or improving app efficiency.

Performance Optimization Guide

Core Components

Performance Monitor

Monitors application performance metrics:

  • Memory usage
  • Response times
  • Battery usage
  • Network performance

Atomic Clock Service

Provides synchronized timestamps for performance tracking.

Performance Monitoring

/// Performance Monitor Service
/// 
/// Monitors application performance metrics
class PerformanceMonitor {
  /// Collect performance metrics
  Future<void> collectMetrics() async {
    final metrics = PerformanceMetrics(
      memoryUsage: await _getMemoryUsage(),
      responseTime: await _getAverageResponseTime(),
      batteryLevel: await _getBatteryLevel(),
      networkLatency: await _getNetworkLatency(),
    );
    
    // Store metrics
    await _storeMetrics(metrics);
    
    // Check thresholds
    _checkThresholds(metrics);
  }
  
  /// Get memory usage
  Future<int> _getMemoryUsage() async {
    // Get current memory usage in MB
    return await _nativeMemoryService.getMemoryUsage();
  }
}

Memory Optimization

/// Optimize memory usage
Future<void> optimizeMemory() async {
  // Clear caches if memory high
  final memoryUsage = await _getMemoryUsage();
  if (memoryUsage > _memoryWarningThreshold) {
    await _clearCaches();
    await _garbageCollect();
  }
}

Response Time Optimization

/// Optimize response times
Future<void> optimizeResponseTime() async {
  // Use async operations
  // Cache frequently accessed data
  // Batch operations when possible
  // Use background processing for heavy operations
}

Battery Optimization

/// Optimize battery usage
Future<void> optimizeBattery() async {
  // Reduce background activity when battery low
  final batteryLevel = await _getBatteryLevel();
  
  if (batteryLevel < 20) {
    // Reduce BLE scanning frequency
    await _reduceBLEScanning();
    // Reduce background sync frequency
    await _reduceBackgroundSync();
  }
}

Reference

  • lib/core/services/performance_monitor.dart - Performance monitoring service
  • lib/core/services/atomic_clock_service.dart - Atomic clock for timestamps

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です