argent-native-profiler
Argent Native Profiler gives you deep visibility into your app's native layer performance across iOS and Android platforms. Pinpoint CPU, memory, and threading issues that slow down user experience, then use detailed diagnostics to eliminate bottlenecks and improve responsiveness.
Argent Native Profiler gives you deep visibility into your app's native layer performance across iOS and Android platforms. Start by capturing a profiling session using xctrace on iOS or Perfetto on Android to record CPU, memory, and threading data. The profiler automatically identifies hotspots and UI hangs, then presents detailed call stacks so you can pinpoint exactly which native functions are consuming resources and causing slowdowns.
AI-generated summary based on this skill's SKILL.md
Install
software-mansion/argent/argent-native-profiler · repository language: TypeScript
git clone https://github.com/software-mansion/argent
cp -r argent/packages/skills/skills/argent-native-profiler ~/.claude/skills/argent-native-profilerFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to profile native performance issues with argent-native-profiler?
Argent Native Profiler gives you deep visibility into your app's native layer performance across iOS and Android platforms. Start by capturing a profiling session using xctrace on iOS or Perfetto on Android to record CPU, memory, and threading data. The profiler automatically identifies hotspots and UI hangs, then presents detailed call stacks so you can pinpoint exactly which native functions are consuming resources and causing slowdowns.
Can argent-native-profiler diagnose UI hangs and memory leaks?
Yes. Argent Native Profiler detects UI hangs by monitoring main thread blocking and captures memory leaks through malloc stack logging on iOS and heap snapshots on Android. When you identify a hang or leak in the trace, drill into the call stack breakdown to find the root cause. The tool shows thread activity and memory pressure to help you understand whether the issue stems from CPU contention, blocking operations, or genuine memory growth.
What native profiler tools does argent-native-profiler use?
Argent Native Profiler leverages xctrace on iOS and Perfetto on Android—industry-standard profiling engines built into each platform. xctrace captures system-level performance data on iOS devices and simulators, while Perfetto provides detailed trace visualization on Android. Both tools feed into Argent's unified analysis layer, letting you compare before-and-after runs side by side to validate that your performance fixes actually work.
How does argent-native-profiler find CPU bottlenecks in native code?
Argent Native Profiler identifies CPU hotspots by sampling call stacks during execution and aggregating CPU time by function. The profiler shows you which native functions consume the most CPU, how often they're called, and which threads they run on. You can expand the call chain to see the full execution path leading to each hotspot, making it easy to spot inefficient algorithms, excessive allocations, or unnecessary work on the main thread.
Does argent-native-profiler work with React Native apps?
Yes. Argent Native Profiler traces the native layer of React Native applications, capturing performance data from the underlying iOS and Android runtimes. This lets you diagnose native-level bottlenecks—such as bridge overhead, native module performance, or platform-specific memory issues—that may be slowing down your React Native app. You'll see both native call stacks and thread breakdown to understand the full performance picture.
How do I compare profiling runs to validate performance fixes?
Argent Native Profiler lets you capture baseline and post-fix profiling sessions, then compare them side by side. View CPU time, memory usage, and call stack frequencies before and after your optimization to confirm the improvement. This comparison workflow helps you measure the real impact of your changes and avoid regressions in future builds.
SKILL.md
rendered from the published skill — quoted content, verbatim
1. Tools
native-profiler-start— start profiling on a booted device. iOS: xctrace recording for CPU, hangs, and leaks.native-profiler-stop— stop the profiler and export trace data to timestamped XML files.native-profiler-analyze— parse exported trace data and return a structured bottleneck payload.profiler-stack-query— drill into parsed data: hang stacks, function callers, thread breakdown, leak details.profiler-load— list and reload previous trace sessions from disk for re-investigation.
2. Platform Support
- iOS: Backend: Xcode Instruments via
xctraceon a booted simulator or connected device. Requires Xcode command-line tools on PATH. Surfaces CPU hotspots, UI hangs, and memory leaks (instrumentsLeakstable). - Android: Backend: Perfetto via
adb shell perfetto+ an in-process WASM trace-processor engine. Surfaces CPU hotspots and UI hangs, with per-hang jank reason codes, a main-thread state breakdown with
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
packages/skills/skills/argent-native-profiler/SKILL.md