Skip to main content

Overview

When integrating any SDK into an Android application, understanding its performance impact is crucial for maintaining a good user experience. The Flashcat RUM SDK is designed with performance in mind and provides transparent measurement data to help you make informed integration decisions.
The SDK uses asynchronous processing and batch reporting mechanisms to avoid blocking the main thread, ensuring it does not affect the application’s UI responsiveness.

Performance Benchmark

To evaluate the actual performance impact of the SDK on your application, we conducted performance benchmarks under typical usage scenarios. The following SDK modules were enabled during testing:
  • fc-sdk-android-rum: RUM core functionality
  • fc-sdk-android-trace: Distributed tracing
  • fc-sdk-android-okhttp: Network request tracking
The SDK was initialized with default configuration and simulated common user operations (such as page views, scrolling lists, network requests, etc.).

Test Results

MetricWith SDKWithout SDKImpact
Peak CPU Usage~27%~25%+2%
Peak Memory Usage~435 MB~437 MBNegligible
App Launch Time~245 ms~230 ms+15 ms
APK Size+500 KB-~0.5 MB
Network Usage~70 KB sent / ~20 KB received-Varies with event volume
The above data are reference values under typical scenarios; actual impact may vary depending on application complexity, device performance, and SDK configuration.

Performance Impact Details

The SDK’s CPU impact primarily comes from:
  • Event collection and processing
  • Data batching and compression
  • Network request reporting
The SDK uses asynchronous processing and batch reporting mechanisms to avoid blocking the main thread, ensuring it does not affect the application’s UI responsiveness.
The SDK uses a fixed-size memory buffer to store pending event data, which does not grow indefinitely over time. Stale data is automatically cleaned up to ensure it does not consume excessive memory.
The SDK initialization process is optimized, with launch time impact controlled to milliseconds.
It is recommended to initialize the SDK as early as possible in Application.onCreate() to capture the complete application startup process.
The SDK uses a modular design, allowing you to include only the necessary functional modules:
ModuleDescription
fc-sdk-android-rumRUM core functionality
fc-sdk-android-traceDistributed tracing
fc-sdk-android-okhttpOkHttp network tracking
fc-sdk-android-webviewWebView tracking
Including only the necessary modules can minimize the impact on APK size.
The SDK employs the following strategies to optimize network usage:
  • Batch reporting: Events are cached locally first and sent in batches to reduce the number of network requests
  • Data compression: Reported data is compressed to reduce transmission traffic
  • Intelligent scheduling: Upload timing is intelligently scheduled based on network status and battery level

Performance Optimization Recommendations

If you have specific performance requirements, consider the following optimization measures:
1

Adjust Sampling Rate

Reduce the number of collected events by configuring the sampling rate:
val rumConfig = RumConfiguration.Builder(applicationId)
    .setSessionSampleRate(80f) // Sample 80% of sessions
    .build()
2

Enable Features on Demand

Only enable necessary tracking features:
val rumConfig = RumConfiguration.Builder(applicationId)
    .trackUserInteractions(false) // Disable user interaction tracking
    .trackLongTasks(false) // Disable long task tracking
    .build()
3

Configure Upload Strategy

Adjust batch upload size and frequency to optimize network usage based on your application’s needs.

Offline Data Storage

When the device is offline, the SDK stores data locally with strict storage space limits:
  • Uses fixed-size disk cache
  • Expired data is automatically cleaned up
  • Cached data will not affect device storage space