WebView and WebKit Memory Tracking
Overview
GameBench Studio Pro Desktop can track memory usage for WebView (Android) and WebKit (iOS) components when these technologies are being used by your target application. This is particularly useful for analyzing JavaScript-based games and applications that render content within web views.
WebView Memory Tracking on Android
Studio Pro Desktop can track memory for android.webkit.WebView components when they are used in your target Android application.
Requirements
To enable WebView memory tracking on Android, you must enable “Multiple processes per app” in the Android settings:
- Open Studio Pro Desktop
- Navigate to Settings → Android
- Enable “Multiple processes per app”
When this setting is enabled, Studio Pro Desktop will automatically detect and track memory usage for any WebView processes associated with your target application.
How It Works
When an Android application uses WebView components, Android may create separate processes for the WebView content. With “Multiple processes per app” enabled, Studio Pro Desktop can identify these associated WebView processes and include their memory usage in your profiling session data.
WebKit Memory Tracking on iOS
Studio Pro Desktop can track memory for WebKit components when they are used in your target iOS application.
Requirements
To enable WebKit memory tracking on iOS, you must enable “Include WebKit memory iOS sessions” in the General settings:
- Open Studio Pro Desktop
- Navigate to Settings → General
- Enable “Include WebKit memory iOS sessions”
When this setting is enabled, Studio Pro Desktop will include WebKit memory usage in your iOS profiling sessions.
How It Works
iOS applications that use WebKit (such as JavaScript games running in a web view) allocate memory for WebKit components. With “Include WebKit memory iOS sessions” enabled, Studio Pro Desktop will capture and include this memory usage in your session data, providing a more complete picture of your application’s memory consumption.
Use Cases
WebView and WebKit memory tracking is particularly useful for:
- JavaScript games that render content within web views
- Hybrid applications that combine native and web-based content
- Applications using embedded browsers for displaying web content
Comparing Metrics Between Platforms
It’s important to note that WebView memory on Android and WebKit memory on iOS may report different numbers for the same application. This is because the two systems’ implementations are fundamentally different and not directly comparable. Android’s WebView and iOS’s WebKit handle memory allocation, process management, and resource sharing differently.
While absolute numbers may differ between platforms, the metrics are still useful when compared relative to a baseline. For example, you can track memory trends over time on the same platform, compare different versions of your application, or identify memory spikes during specific user interactions. The relative changes and patterns are what matter most for performance analysis.
Viewing Memory Data
Once you’ve enabled the appropriate settings and completed a profiling session, WebView/WebKit memory data will be included in your session results. You can view this data in the Memory Pane of the GameBench web dashboard.