Commit 739f899
Fix for 1668: Given a large test suite, selecting all tests from the root of tree, freezes RIDE for some time (#2210)
* 1668: The Select All Tests command on the root of a deeply nested test folder, freezes RIDE for several minutes.
The problem is caused by Tree.SelectAllTests strategy: expanding and collapsing all the nodes. This causes CPU waste to expand/collapse (and maybe render) and wait for the creation of the tree node handlers.
The idea of the fix is to navigate the tests using the link between controllers. In order to avoid all the dancing of the tree nodes.
In this commit:
- Changed Tree.SelectAllTests() to extract all the TestCaseController(s) and invoke TestSelectionController to change the selection for these.
- Now both _ActionHandler OnDeselectAllTests() and OnSelectAllTests() invoke Tree.SelectAllTests(), with a parameter.
- When a new TestCaseHandler is created, is registered to be notified about selection changes. It uses this notification to update the graphical node with the check.
- RideTestSelectedForRunningChanged now also holds the controller of the test which has changed selection and whether has been selected or unselected.
* Replace Tree DeselectAllTests(node) with SelectAllTests(node,False) as it's much more efficient.
* TestSelectionController: Keep a copy of the tests to propagate in the event, rather than rebuild it everytime.
* When selecting multiple tests, from the test search, do it efficiently.
TestSelectionController: add select_all() to select multiple tests efficiently. Rewrite unselect_all() in terms of select_all()
Tree: when selecting multiple tests, no need to navigate the full tree, just use TestSelectionController.
* When deselecting multiple tests, from the test search, do it efficiently.
Tree: when deselecting multiple tests, no need to navigate the full tree, just use TestSelectionController.
* Do not expand all the tree nodes when selecting failed/passed tests.
- Keep the information of failed/passed tests in TestCaseController
- Update the information on the test execution
- When selecting only failed/passed tests navigate the controller'tree rather than the graphical tree.
- removed method _for_all_tests() as it was causing all the nodes to be loaded/rendered.
* When selecting/deselecting multiple Tests, notify a single selection change event. Rather than one for each Test.
* Restore previous behavior with "Select Failed/Passed": select only those and de-select any other test.
* keep track of the selected tests using the TestCaseController(s), instead of the list of names.
This removes the need for listen of name changes.
* No need to generate the list of names, when determining if there's any.
* Fix TestSelectionController.add_tag()
* Handle RideTestSelectedForRunningChanged event on a new wx thread stack.
This is to avoid the "Recursionerror: maximum recursion depth exceeded"
* Remove unused variable.
* Propagate the RideTestSelectedForRunningChanged event only if the selection actually changed.
Co-authored-by: Valerio Bruno <[email protected]>1 parent 56789e0 commit 739f899
File tree
7 files changed
+131
-102
lines changed- src/robotide
- contrib/testrunner
- controller
- ui
- ui
- utest/controller/ui
7 files changed
+131
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
219 | 224 | | |
220 | 225 | | |
221 | 226 | | |
222 | | - | |
| 227 | + | |
223 | 228 | | |
224 | 229 | | |
225 | 230 | | |
| |||
305 | 310 | | |
306 | 311 | | |
307 | 312 | | |
308 | | - | |
| 313 | + | |
309 | 314 | | |
310 | 315 | | |
311 | 316 | | |
| |||
375 | 380 | | |
376 | 381 | | |
377 | 382 | | |
378 | | - | |
379 | | - | |
| 383 | + | |
| 384 | + | |
380 | 385 | | |
381 | 386 | | |
382 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
629 | 636 | | |
630 | 637 | | |
631 | 638 | | |
| |||
705 | 712 | | |
706 | 713 | | |
707 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
708 | 720 | | |
709 | 721 | | |
710 | 722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| |||
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
392 | 405 | | |
393 | 406 | | |
394 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 179 | + | |
201 | 180 | | |
202 | 181 | | |
203 | 182 | | |
204 | 183 | | |
205 | 184 | | |
206 | | - | |
| 185 | + | |
207 | 186 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
211 | 190 | | |
212 | 191 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 192 | + | |
222 | 193 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
226 | 213 | | |
227 | 214 | | |
228 | | - | |
| 215 | + | |
229 | 216 | | |
230 | 217 | | |
231 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
| 491 | + | |
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
527 | 532 | | |
528 | 533 | | |
529 | 534 | | |
| |||
533 | 538 | | |
534 | 539 | | |
535 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
536 | 548 | | |
537 | 549 | | |
538 | 550 | | |
| |||
0 commit comments