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

DevTools Profiler: Improve how empty commits are filtered #17771

Merged

Commits on Jan 3, 2020

  1. DevTools Profiler: Improve how empty commits are filtered

    Previously, DevTools filtered empty commits on the backend, while profiling, through the use of a bailout heuristic that React currently happens to use. This approach was brittle and may have exacerbated the long-standing Profiler bug facebook#16446.
    
    This PR removes that heuristic and adds as a post-processing filtering pass instead. This removes the coupling between DevTools and a React internal implementation detail that may change.
    
    I believe DevTools has two choices of criteria for this filtering:
    * Filter commits that have no actual duration metadata.
    * Filter commits that have no recorded operations (no mutations to the tree, no changed tree base durations).
    
    I chose the first option, filtering by commits that have no reported metadata. It will miss an edge case, e.g. , but we would have nothing meaningful to show in the Profiler for those cases anyway. (This particular edge case is why one of the snapshots changed with this commit.)
    
    The second option, filtering by recorded operations, could potentially miss a more important edge case: where a component *did* render, but its  didn't change. (In that event, there would be no operations to send.)
    Brian Vaughn committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    d8305dd View commit details
    Browse the repository at this point in the history