Skip to content

Remove unnecessary wrapper from Performance/PerformanceObserver examples screen in RNTester#43706

Closed
rubennorte wants to merge 6 commits into
facebook:mainfrom
rubennorte:export-D55489933
Closed

Remove unnecessary wrapper from Performance/PerformanceObserver examples screen in RNTester#43706
rubennorte wants to merge 6 commits into
facebook:mainfrom
rubennorte:export-D55489933

Conversation

@rubennorte
Copy link
Copy Markdown
Contributor

Summary:
Changelog: [internal]

Just a small improvement of the UI for the Performance API examples in RNTester.

Differential Revision: D55489933

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Mar 28, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D55489933

…cebook#43705)

Summary:

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D55477744
…RNTester (facebook#43704)

Summary:

Changelog: [internal]

Adding examples of the rest of APIs in `Performance`/`PerformanceObserver` starting with marks and measures.

Reviewed By: rshest

Differential Revision: D55477746
…ame (facebook#43703)

Summary:

Changelog: [internal]

(internal because this API isn't available in OSS yet)

I found a bug in the current implementation of `performance.measure` where the API would use the first `mark` reported under a specific name instead of the last one (found it in the new example in RNTester in D55477746 that re-logs the marks every time we click on a button).

The root cause for this problem is that we were using `insert` from `std::unordered_set` to update the value, but `insert` doesn't modify the value if it's already present.

This fixes the issue by doing a lookup and removing the value prior to inserting it.

Differential Revision: D55477743
…er (facebook#43702)

Summary:

Changelog: [internal]

Just a minor refactor to use C++20 designated initializers in `PerformanceEntryReporter` and its tests, while removing unnecessary initialization for optional fields.

Reviewed By: rshest

Differential Revision: D55477745
…erver (facebook#43701)

Summary:

Changelog: [internal]

We were defining an `UNDEFINED` type of entry that should never happen in practice and we were using unnecessarily to signal "no type" where an optional type would be more suitable. Most importantly, **we were incorrectly allocating a buffer for entries of this type**.

This removes that type and the unnecessary buffer.

Reviewed By: rshest

Differential Revision: D55478890
…les screen in RNTester (facebook#43706)

Summary:

Changelog: [internal]

Just a small improvement of the UI for the Performance API examples in RNTester.

Differential Revision: D55489933
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D55489933

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 18,877,219 +249
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,250,259 +245
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: ad93680
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 2, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 2f1643d.

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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants