Skip to content

Conversation

hannojg
Copy link
Contributor

@hannojg hannojg commented Jul 22, 2025

Summary:

There are some duplicated function calls in PerformanceEntryReporter::reportMark() . I know this is a micro optimization but I feel this way the code is cleaner.

This is called through performance.mark so there is potentially a tiny little performance improvement here?

Changelog:

[INTERNAL] [FIXED] - Removed redundant checks in PerformanceEntryReporter::reportMark()

Test Plan:

The existing testing infrastructure should cover these callsites i believe

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 22, 2025
@hannojg hannojg changed the title fix: remove redundant calls in traceMark fix: remove redundant if cehcks in traceMark Jul 22, 2025
@hannojg hannojg changed the title fix: remove redundant if cehcks in traceMark fix: remove redundant if checks in traceMark Jul 22, 2025
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 22, 2025
@facebook-github-bot
Copy link
Contributor

@cortinico has imported this pull request. If you are a Meta employee, you can view this in D78731441.

@rubennorte
Copy link
Contributor

Thanks for simplifying this!

I know this is a micro optimization but I feel this way the code is cleaner.

To be honest, this isn't a micro-optimization but a previous refactor that left some unnecessary code in place.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @hannojg in bbc0c0b

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jul 22, 2025
ghost pushed a commit to discord/react-native that referenced this pull request Jul 29, 2025
Summary:
There are some duplicated function calls in `PerformanceEntryReporter::reportMark()` . I know this is a micro optimization but I feel this way the code is cleaner.

This is called through `performance.mark` so there is potentially a tiny little performance improvement here?

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [FIXED] - Removed redundant checks in `PerformanceEntryReporter::reportMark()`

Pull Request resolved: facebook#52756

Test Plan: The existing testing infrastructure should cover these callsites i believe

Reviewed By: rubennorte

Differential Revision: D78731441

Pulled By: cortinico

fbshipit-source-id: e0de12c3c6f55e12eb454ea4b7081f3d6003126c
kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
Summary:
There are some duplicated function calls in `PerformanceEntryReporter::reportMark()` . I know this is a micro optimization but I feel this way the code is cleaner.

This is called through `performance.mark` so there is potentially a tiny little performance improvement here?

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [FIXED] - Removed redundant checks in `PerformanceEntryReporter::reportMark()`

Pull Request resolved: facebook#52756

Test Plan: The existing testing infrastructure should cover these callsites i believe

Reviewed By: rubennorte

Differential Revision: D78731441

Pulled By: cortinico

fbshipit-source-id: e0de12c3c6f55e12eb454ea4b7081f3d6003126c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants