Add pin rows to Profile Memory table#9832
Conversation
There was a problem hiding this comment.
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.
…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>
|
Hey @khanak0509 thanks for contributing! Apologies it looks like this fell through the review cracks. Would you like to still work on this change? |
srawlins
left a comment
There was a problem hiding this comment.
Code looks good. I want to pull it down and play with it.
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
after
Pre-launch Checklist
General checklist
///).Issues checklist
contributions-welcomeorgood-first-issuelabel.contributions-welcomeorgood-first-issuelabel. I understand this means my PR might take longer to be reviewed.Tests checklist
AI-tooling checklist
Feature-change checklist
release-notes-not-requiredlabel or left a comment requesting the label be added.packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.If you need help, consider asking for help on Discord.