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

report an event tracking the event loop perf in metro dev middleware #49674

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

vzaidman
Copy link
Contributor

Summary:
Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Differential Revision: D69988265

@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 Feb 25, 2025
@facebook-github-bot
Copy link
Contributor

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

vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 27, 2025
…acebook#49674)

Summary:

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Differential Revision: D69988265
@facebook-github-bot
Copy link
Contributor

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

vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 27, 2025
…acebook#49674)

Summary:
Pull Request resolved: facebook#49674

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Differential Revision: D69988265
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 28, 2025
…acebook#49674)

Summary:

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Reviewed By: hoxyq

Differential Revision: D69988265
Differential Revision: D70324724
Summary:
The terminal status display is not very good with handling interactive status updates:
1. It swallows logs in between, in the very critical moment where we log the initial state of Metro statup.
2. Some logs appear next to updates
3. We end up with ghost update lines, ending up spamming the console with previous status updates.

I tried fixing it, and realized it's at least hard (if not impossible if there are several terminal sources like node warnings, console.log, etc...).

I think it is not worth maintaining. Instead- I came up with a new heuristic to print only 4 updates for each bundle:
* 0%, 33%, 66%, 99%, and then on success.
* Also, don't print anything for less than 50 total files being transformed. For smaller bundles we will jump from 0 to success quickly enough. For bigger bundles, by the time we reach 50, we seem to have a more reliable progress indication available despite `totalCount` progressively growing.

Changelog: [General][Internal] remove interactive bundling status bars

Differential Revision: D70381801
Differential Revision: D70402368
Differential Revision: D70403987
Differential Revision: D69988266
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 28, 2025
…acebook#49674)

Summary:

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Reviewed By: hoxyq

Differential Revision: D69988265
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 28, 2025
…acebook#49674)

Summary:

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Reviewed By: hoxyq

Differential Revision: D69988265
@facebook-github-bot
Copy link
Contributor

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

vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 28, 2025
…acebook#49674)

Summary:
Pull Request resolved: facebook#49674

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Reviewed By: hoxyq

Differential Revision: D69988265
@facebook-github-bot
Copy link
Contributor

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

vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 28, 2025
…acebook#49674)

Summary:
Pull Request resolved: facebook#49674

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Reviewed By: hoxyq

Differential Revision: D69988265
…acebook#49674)

Summary:
Pull Request resolved: facebook#49674

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Reviewed By: hoxyq

Differential Revision: D69988265
@facebook-github-bot
Copy link
Contributor

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

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 p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants