Skip to content

Conversation

@V3RON
Copy link
Contributor

@V3RON V3RON commented Dec 15, 2025

Description

Add a Metro require profiler plugin that instruments require() calls to track module initialization times in React Native applications. This plugin provides developers with detailed insights into module loading performance through an interactive flame graph visualization, helping identify slow-loading modules and optimize app startup times.
The plugin consists of:
Metro instrumentation: Hooks into Metro's SYSTRACE system to automatically track all require() call timings
React Native integration: DevTools hook that communicates with the Rozenite platform
UI visualization: Interactive flame graph showing module dependency trees with color-coded timing data
Performance metrics: Real-time display of total initialization time, module count, and per-module evaluation times

Context

This plugin was implemented to solve the challenge of understanding module loading performance in React Native applications. Without visibility into which modules take the longest to initialize, developers struggle to optimize app startup times and identify candidates for lazy loading.
The implementation uses Metro's existing SYSTRACE instrumentation infrastructure, which provides low-overhead timing measurements without significantly impacting development performance. The flame graph visualization makes it intuitive to identify performance bottlenecks in complex module dependency trees.

Testing

The plugin was tested manually against the playground app.

@vercel
Copy link

vercel bot commented Dec 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
rozenite Ready Ready Preview, Comment Dec 20, 2025 9:20am

@V3RON V3RON merged commit 12c37c8 into main Dec 20, 2025
2 of 3 checks passed
@V3RON V3RON deleted the feat/require-profiler-plugin branch December 20, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants