Skip to content

"Unresponsive extension host" opening large project #4326

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

Closed
DanTup opened this issue Dec 28, 2022 · 2 comments · Fixed by #4328
Closed

"Unresponsive extension host" opening large project #4326

DanTup opened this issue Dec 28, 2022 · 2 comments · Fixed by #4328

Comments

@DanTup
Copy link
Member

DanTup commented Dec 28, 2022

While looking into #4325, with f32_test.dart open and running "Reload Window" to restart, I see this in the console:

Screenshot 2022-12-28 at 11 31 13

Several profiles here:

cpu profiles.zip

@DanTup
Copy link
Member Author

DanTup commented Jan 3, 2023

Screenshot 2023-01-03 at 12 09 39

rebuildFromOutline walks down the tree and calls some expensive code. The total in this profile was 3.5s.

@DanTup
Copy link
Member Author

DanTup commented Jan 3, 2023

Whenever we discover a test, we do this:

this.updateNode(testNode.parent);
this.rebuildSuiteNode(suite);

This rebuilds the parent, which means for a group with lots of tests, we're rebuilding all the siblings. But we then rebuild the entire suite, which not only duplicates all of that work, but then also does it for the rest of the file.

The intention here is to ensure the parent statuses are up-to-date, but seems like maybe we could a) avoid the duplicated work, b) walk up instead of down to avoid doing more nodes then we need to, c) do we even need to update any status here? Can a newly-discovered test even change any parent statuses since it has the lowest status?

(it's possible we need to rebuild the parent in order to replace its children, but we should find a way to do that that doesn't involve calling createTestItem for every sibling again).

DanTup added a commit that referenced this issue Jan 3, 2023
Remove the statuses maintained on each node (which require rebuilding lots of nodes), plus store tests/groups indexed by names to reduce lookups.

See #4325.
See #4326.
DanTup added a commit that referenced this issue Jan 4, 2023
Remove the statuses maintained on each node (which require rebuilding lots of nodes), plus store tests/groups indexed by names to reduce lookups.

See #4325.
See #4326.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant