flutter / flutter/devtools

Switching from class to class sometimes is slow

Open
#4,851 4 comments 0 reactions 0 assignees View on GitHub
devtools app performance memory > diff P2 screen: memory
Dominant language
Dart
Stars
1.7k
Forks
404
Avg merge
6d 17h
Merged PRs (30d)
18

Description

On the memory diff tab, after taking a snapshot, pretend we have classes A and B.

Selecting class A performs computation to calculate the set of retaining paths for to A. Then selecting class B, does the same thing for all the retaining paths of class B. Selecting class A again should be fast, since we have already performed this work. But it appears to take equally as long to compute the set of retaining paths. I suspect we are not caching this computation.

Contributor guide

Open the contributing guide

Research direction

Start in the memory diff tab implementation, following the retaining-path computation triggered when a class is selected. Reproduce the A–B–A selection sequence after taking a snapshot and compare the repeated computation time. Done means returning to class A avoids recomputing its retaining paths while preserving the displayed results.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.