
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
react-native-release-profiler
Advanced tools
A fast and simple library to passively profile JS/Hermes performance in production and release builds.
A fast and simple library to passively profile JS/Hermes performance in production and release builds.
Usually performance issues are profiled in debug builds, which could lead to false positives (e.g. JS Garbage Collectors, Hermes-specific debug markers, or other LLDB hangs).
react-native-release-profiler allows you to profile your app in release builds, both in a local environment to profile specific issues, as well as in a production environment to spot regressions or collect performance samples from a wider variety of user devices.
The web support is based on sampling JS Self-Profiling API, so not all browsers support it yet. To see in which browsers it is supported, check this page.
To make it possible to work you'll need to add 'Document-Policy': 'js-profiling'
header to your server response. Using webpack
in dev mode you can do that by adding these lines to your webpack.config.js
:
devServer: {
headers: {
'Document-Policy': 'js-profiling',
},
}
[!WARNING] By default sampling interval is set to 10 milliseconds. This is the lowest supported interval, but on Windows machines this interval will be 16 milliseconds.
If you're having performance problems in your app, feel free to reach out to us at hello@margelo.io. We do this a lot. 😉
yarn add react-native-release-profiler
cd ios && pod install
import { startProfiling } from 'react-native-release-profiler'
startProfiling()
import { stopProfiling } from 'react-native-release-profiler'
// `true` to save the trace to the phone's downloads folder, `false` otherwise
const path = await stopProfiling(true)
npx react-native-release-profiler --fromDownload --appId <your appId>
npx react-native-release-profiler --local <path to profile>
startProfiling(): void
Synchronously starts the Hermes Profiling Session.
stopProfiling(saveInDownloadsDirectory?: boolean, fileName?: string): Promise<string>
Asynchronously stops the Hermes Profiling Session, and saves the file in a cache or downloads directory if saveInDownloadsDirectory
is true
using the provided fileName
(web only).
Returns the path of the saved profile.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
A fast and simple library to passively profile JS/Hermes performance in production and release builds.
The npm package react-native-release-profiler receives a total of 13,685 weekly downloads. As such, react-native-release-profiler popularity was classified as popular.
We found that react-native-release-profiler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.