Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native raw event EventEmitter - intended for app-specific perf listeners and debugging #23232

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more comments about how the event telemetry system works
  • Loading branch information
JoshuaGross committed Feb 7, 2022
commit 229595d7a8502b51750ee78d3dc70afd5b71e657
5 changes: 5 additions & 0 deletions packages/react-native-renderer/src/ReactFabricEventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ export function dispatchEvent(
// telemetry on event latency in your application, and could also be useful for debugging
// low-level events issues.
//
// If you do not have any event telemetry and are extremely concerned about event perf,
// it is safe to disable these "emit" statements; it will prevent checking the size of
// an empty array twice and prevent two no-ops. Practically the overhead is so low that
// we don't think it's worth thinking about in prod; your perf issues probably lie elsewhere.
//
// We emit two events here: one for listeners to this specific event,
// and one for the catchall listener '*', for any listeners that want
// to be notified for all events.
Expand Down