You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Unresponsive extension host" opening large project #4326
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).
Activity
DanTup commentedon Jan 3, 2023
rebuildFromOutlinewalks down the tree and calls some expensive code. The total in this profile was 3.5s.DanTup commentedon Jan 3, 2023
Whenever we discover a test, we do this:
Dart-Code/src/shared/test/test_model.ts
Lines 439 to 440 in 686c268
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 callingcreateTestItemfor every sibling again).Avoid rebuilding more of test tree/model than necessary
Avoid rebuilding more of test tree/model than necessary