Xcode tools to measure Metal Performance #1469
Replies: 4 comments
-
|
Results from an Instruments profile from an iPhone SE using the Game Performance Profile. An Average Frame Time duration of 16.67 ms is one 60 fps frame. |
Beta Was this translation helpful? Give feedback.
-
|
Enabling the Frame Capture option in the Run Scheme also allows for more insight. And if nothing else some "eye candy" on how a map is drawn. GPU Trace of MapLibre by enabling the Metal GPU Counters maplibre-gputrace.mov |
Beta Was this translation helpful? Give feedback.
-
|
Very nice and useful! 👍 |
Beta Was this translation helpful? Give feedback.
-
|
As a test, I have adding some logging to the MapLibre Objective-C event handlers which allows us to measure the time difference between events ( We are seeing multiple There is also evidence that two of the events are firing twice. Timing-wise, it's not significant, but I'm not sure why that is happening. Full, un-snipped data at the bottom. Time Measurement of MapLibre test app after a warm install. It's not clear if Metal Logging or MetalANGLE is the source of the performance hit. Raw Time stamp Data 13:42:22.728863,Metal GPU Frame Capture Enabled
13:42:22.730925,Metal API Validation Enabled
13:42:22.922441,MGLMapView WARNING UIViewController.automaticallyAdjustsScrollViewInsets is deprecated use MGLMapView.automaticallyAdjustContentInset instead.
13:42:22.981669,[maplibre] mapViewWillStartLoadingMap
13:42:22.981782,[maplibre] onWillStartLoadingMap
13:42:22.992816,[maplibre] mapViewWillStartLoadingMap
13:42:22.992887,[maplibre] onWillStartLoadingMap
13:42:23.026326,[maplibre] mapViewWillStartRenderingMap
13:42:23.026553,[maplibre] onWillStartRenderingMap
13:42:23.380332,[maplibre] mapViewDidFinishLoadingStyle
13:42:23.380722,[maplibre] onDidFinishLoadingStyle
13:42:25.821380,[Metal Compiler Warning] Warning: Compilation succeeded with:
13:42:25.997340,[Metal Compiler Warning] Warning: Compilation succeeded with:
13:42:26.262554,[Metal Compiler Warning] Warning: Compilation succeeded with:
13:42:26.289862,[Metal Compiler Warning] Warning: Compilation succeeded with:
13:42:26.878745,[Metal Compiler Warning] Warning: Compilation succeeded with:
13:42:26.884729,[maplibre] onDidFinishRenderingMap
13:42:26.884913,[maplibre] mapViewDidFinishLoadingMap
13:42:26.884986,[maplibre] onDidFinishLoadingMap
13:42:26.902628,[maplibre] mapViewDidBecomeIdle
13:42:26.902863,[maplibre] onDidBecomeIdle
13:42:29.971837,[maplibre] mapViewDidBecomeIdle
13:42:29.972060,[maplibre] onDidBecomeIdlepotentially Related MetalANGLE Research questions (FB9120382):
After a session at WWDC 21, I was able to research other options. Details also at developer.apple.com/forums/thread/659856.
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Xcode has a set of tools with excellent documentation on how to Optimize Performance with GPU Counters for measuring performance of our Metal based engine.
Opening this issue for any Game Developers or teams that want to aid in measuring the performance of the MapLibre solution.
Items to review
Measuring FPS on a device with the MapLibre Swift UI app

iosapp-swiftuiBeta Was this translation helpful? Give feedback.
All reactions