Skip to content

Add pin rows to Profile Memory table#9832

Open
khanak0509 wants to merge 4 commits into
flutter:masterfrom
khanak0509:profile-memory-pin-rows
Open

Add pin rows to Profile Memory table#9832
khanak0509 wants to merge 4 commits into
flutter:masterfrom
khanak0509:profile-memory-pin-rows

Conversation

@khanak0509
Copy link
Copy Markdown
Contributor

Fixes #8898

Trace Instances already keeps traced classes at the top (via the checkbox), but Profile Memory didn’t have anything similar

This PR adds a Pin column to Profile Memory. Tap the pin icon on a row and that class stays in the pinned section at the top (under All Classes), with a divider between pinned and the rest of the table, same general idea as Trace Instances, but without turning on allocation tracing

before

Screenshot 2026-05-15 at 2 01 15 PM

after

Screenshot 2026-05-15 at 2 15 38 PM image image

Pre-launch Checklist

General checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I updated/added relevant documentation (doc comments with ///).

Issues checklist

Tests checklist

  • I added new tests to check the change I am making...
  • OR there is a reason for not adding tests, which I explained in the PR description.

AI-tooling checklist

  • I did not use any AI tooling in creating this PR.
  • OR I did use AI tooling, and...
    • I read the AI contributions guidelines and agree to follow them.
    • I reviewed all AI-generated code before opening this PR.
    • I understand and am able to discuss the code in this PR.
    • I have verifed the accuracy of any AI-generated text included in the PR description.
    • I commit to verifying the accuracy of any AI-generated code or text that I upload in response to review comments.

Feature-change checklist

  • This PR does not change the DevTools UI or behavior and...
    • I added the release-notes-not-required label or left a comment requesting the label be added.
  • OR this PR does change the DevTools UI or behavior and...
    • I added an entry to packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.
    • I included before/after screenshots and/or a GIF demo of the new UI to my PR description.
    • I ran the DevTools app locally to manually verify my changes.

build.yaml badge

If you need help, consider asking for help on Discord.

@khanak0509 khanak0509 requested review from a team, bkonyi and kenzieschmoll as code owners May 15, 2026 09:16
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a feature to pin classes to the top of the Profile Memory table in DevTools. The implementation involves updating the AdaptedProfile and ProfileRecord models to track pinning status, adding pinning logic and serialization to the ProfilePaneController, and creating a new _PinColumn for the UI. Review feedback identifies a logical issue where the pinned classes listener is not updated during initialization, suggests improving the stateful widget's resilience to controller changes, and highlights performance concerns regarding redundant builders and inefficient key generation for the table.

Comment thread packages/devtools_app/lib/src/screens/memory/panes/profile/profile_view.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/memory/panes/profile/profile_view.dart Outdated
khanak0509 and others added 3 commits May 15, 2026 16:04
…file_pane_controller.dart

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…file_view.dart

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the ability to pin rows in the Profile Memory table

1 participant