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

Delete unstable scheduler/tracing entry point #21285

Closed
bvaughn opened this issue Apr 15, 2021 · 8 comments · Fixed by #20037
Closed

Delete unstable scheduler/tracing entry point #21285

bvaughn opened this issue Apr 15, 2021 · 8 comments · Fixed by #20037

Comments

@bvaughn
Copy link
Contributor

bvaughn commented Apr 15, 2021

No description provided.

@eps1lon
Copy link
Collaborator

eps1lon commented Apr 15, 2021

For what it's worth:
I've used scheduler/tracing with React.Profiler to profile our components by re-using tests. Didn't have time to fully explore it (using timings, aggregating etc) but it already helped identify "over-committing" i.e. interactions that we'd like to handle in a single commit.

Removal of scheduler/tracing would mean we wouldn't be able to link back to the programmatic interaction in a test or rather just to the test but not the specific line). I think we could still disagreggate all render results into interactions for our specific usage.

Initial implementation: https://github.com/mui-org/material-ui/pull/24289/files#diff-11c29f77f44b9b70ef2fb4c1f11523bd53bf3bed1d82dca2efcaabf945667076
Example profiling session (note the links to the sourcecode which implemented via scheduler/tracing): https://mui-dashboard.netlify.app/test-profile/240420/details/%3CAutocomplete%20%2F%3E%20click%20input%20should%20maintain%20list%20box%20open%20clicking%20on%20input%20when%20it%20is%20not%20empty (overview of all tests: https://mui-dashboard.netlify.app/test-profile/240420)

@bvaughn
Copy link
Contributor Author

bvaughn commented Apr 15, 2021

I hear you. Unfortunately it doesn't work well with larger modern React apps with batched updates and lots of Suspense usage. When React batches updates together, their interactions get entangled and then the data because noisy. Cascading updates also carry along all of the entangled updates.

There's a need for a good API here, but scheduler/tracing isn't it. First step is to remove it. Later step will be to design a better replacement.

@eps1lon
Copy link
Collaborator

eps1lon commented Apr 15, 2021

All good. Just wanted to share a concrete use case since you did ask a while back on twitter I think and I didn't have it ready at the time.

Making it a noop silently would have been better for me. Now I'm reminded of how cool this seemed and now I'm sad it's gone 😄

@bvaughn
Copy link
Contributor Author

bvaughn commented Apr 15, 2021

Sorry 😁

@samcooke98
Copy link

Sorry for the ping, @bvaughn, what do you think of removing the interactions tab from the react-devtools? I'd be willing to submit a PR if you're open for it.

I was just about to start using unstable_trace to help diagnose some issues, and nearly started using it before realising it was removed

@bvaughn
Copy link
Contributor Author

bvaughn commented May 19, 2021

@samcooke98 That tab was already removed (as part of #20037).

@samcooke98
Copy link

Oh my bad, it seems I was running an old development version 🤦 - sorry!

@bvaughn
Copy link
Contributor Author

bvaughn commented May 19, 2021

Haha no problem! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants