Skip to content

Clear widget rebuild stats table when "Track widget rebuild counts" is turned off #4886

Open

Description

@kenzieschmoll

Do we want to clear out the existing data when we disable this setting?
Screen Shot 2022-12-02 at 11 10 14 AM

Activity

  1. added
    devtools-performance-screen
    devtools-performance-rebuild-stats
    on Dec 2, 2022
  2. jacob314 commented on Dec 5, 2022

    @jacob314
    Contributor

    We'll need to make sure we still show the stats in offline mode but seems reasonable. "latest frame" is definitely misleading if you have turned the feature off.

  3. bubnov commented on Mar 12, 2023

    @bubnov

    Hi! How can I find these stats in dev tools? Is it available?

  4. kenzieschmoll commented on Mar 13, 2023

    @kenzieschmoll
    MemberAuthor

    This feature is under construction - hopefully this will be available soon! FYI @jacob314

  5. added
    P2
    and removed on Jul 5, 2023
  6. MiniSuperDev commented on Apr 19, 2024

    @MiniSuperDev

    This feature is under construction - hopefully this will be available soon! FYI @jacob314

    Hi, Is this stats view now available?
    Thanks

  7. added
    contributions welcome
    and removed on Oct 15, 2026
  8. hkarmoush commented on Nov 30, 2026

    @hkarmoush
    Contributor

    I'd like to pick this up. Before writing anything I wanted to check which behavior you want, because clearing on disable has a couple of side effects in the current code:

    • RebuildCountModel.clearAllCounts() also drops the per-frame rebuilds, and the Frame Analysis tab reads those. So if you record with tracking on and then turn it off, every earlier frame loses its rebuild table.
    • toJson() returns null once the per-frame map is empty, so the rebuild stats would be left out of an export made after disabling.
    • ServiceExtensionManager.vmServiceClosed() resets every extension state to disabled, so a plain "clear when disabled" listener would also fire on disconnect. That needs a guard to keep the stats available for offline review, which is the case @jacob314 mentioned above.

    Two options I see:

    1. Clear everything when the setting is turned off by the user (with the disconnect guard). Simple, but loses the Frame Analysis and export data as described.
    2. Keep the data and only stop showing the "Latest frame" column while tracking is off, since that is the part that is misleading. "Overall" and "Selected frame" stay, and the Clear button is still there for anyone who wants an empty table.

    I lean towards 2. Either way I'd put the listener in the performance controller rather than in RebuildStatsView, because the setting can also be toggled from the Frame Analysis tab and the "More debugging options" menu before the Rebuild Stats tab is ever built.

    @kenzieschmoll @srawlins which one would you prefer?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2contributions welcomedevtools-performance-rebuild-statsdevtools-performance-screen

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions