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

[FB-only] Show which hooks (indices) changed when profiling #20998

Merged

Commits on Mar 17, 2021

  1. Added FB-only feature to show which hooks changed during profiling

    I don't think this feature is broadly useful, but Benoit has asked for it to help with his performance investigations so I have enabled it only for Facebook DevTools builds.
    
    Note this doesn't impact either build unless the "Record why each component rendered while profiling." setting is enabled. When the feature flag and the setting are enabled, selecting an element in a profile will show which hooks have changed. Since the Profiler can't display the names of the changed hooks (it would be too heavy to compute this at runtime) the numbers will need to be matched up to the selected component. Fortunately the selection is synced between these two panels which should make matching at least somewhat faster.
    
    This is the first feature to actually use the recent DevTools feature flag system, so I also had to tweak a few things to make that work like it should.
    Brian Vaughn committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    f1051ca View commit details
    Browse the repository at this point in the history
  2. Destructuring nit

    Brian Vaughn committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    1b64e56 View commit details
    Browse the repository at this point in the history
  3. Add primiive hook numbers to Components tree

    Brian Vaughn committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    67f6460 View commit details
    Browse the repository at this point in the history
  4. Changed hook number visual style to look more like bades

    Brian Vaughn committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    826a5da View commit details
    Browse the repository at this point in the history