Repository navigation
Closed
Labels
fixedIssues that have been fixed and can be closed already
Description
It seems that when collapsing an element, redundant callbacks are called, and make millions of sie computations on elements and scrollbars.
I've found some kind of bugfix, although I'm unsure of its side effects (all seems to work smoothly on my RIDE since then)
In \Lib\site-packages\robotide\ui\tree.py
Comment this function out, line 725:
# TODO: Remove method if CustomTreeItem defines it
def OnTreeItemCollapsing(self, event):
item = event.GetItem() # On large trees this is slow when item is root
self._for_all_running_tests(item, lambda t: self._hideanimation(t))
And then comment out this, line 123:
self.Bind(wx.EVT_TREE_ITEM_COLLAPSING, self.OnTreeItemCollapsing)
PROFILING before bugfix:
$ python -m cProfile -s cumulative ride.py
65753742 function calls (61345321 primitive calls) in 101.126 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.005 0.005 104.158 104.158 ride.py:19(<module>)
1 0.000 0.000 103.324 103.324 __init__.py:69(main)
1 0.004 0.004 103.324 103.324 __init__.py:100(_run)
1 0.000 0.000 93.009 93.009 core.py:2162(MainLoop)
1 11.997 11.997 93.009 93.009 {MainLoop}
18639/29 0.074 0.000 78.563 2.709 eventhandler.py:22(wrapped)
170 0.020 0.000 78.286 0.461 customtreectrl.py:7794(OnMouse)
4 0.000 0.000 78.228 19.557 customtreectrl.py:5563(Toggle)
9306/2 0.418 0.000 78.220 39.110 customtreectrl.py:5513(Collapse)
9306/2 0.023 0.000 78.218 39.109 tree.py:726(OnTreeItemCollapsing)
9306/2 0.062 0.000 78.218 39.109 tree.py:735(_for_all_running_tests)
65696/28 0.439 0.000 78.218 2.794 tree.py:772(_for_all_tests)
18618 2.247 0.000 58.819 0.003 customtreectrl.py:8367(CalculatePositions)
2463416/18618 9.149 0.000 56.492 0.003 customtreectrl.py:8295(CalculateLevel)
2450026 15.760 0.000 41.042 0.000 customtreectrl.py:8206(CalculateSize)
65701 0.470 0.000 38.913 0.001 customtreectrl.py:5423(Expand)
2450713 15.716 0.000 15.716 0.000 {built-in method GetFullMultiLineTextExtent}
13963 0.108 0.000 11.584 0.001 customtreectrl.py:6363(AdjustMyScrollbars)
1 0.000 0.000 9.396 9.396 application.py:41(__init__)
1 0.000 0.000 9.396 9.396 core.py:2056(__init__)
1 0.001 0.001 9.394 9.394 {built-in method _BootstrapApp}
1 0.000 0.000 9.393 9.393 application.py:47(OnInit)
13963 6.808 0.000 6.812 0.000 {built-in method SetScrollbars}
1 0.000 0.000 6.380 6.380 application.py:93(_load_data)
1 0.000 0.000 6.379 6.379 project.py:124(load_data)
1 0.000 0.000 6.379 6.379 project.py:156(_load_datafile)
2612 0.036 0.000 5.952 0.002 tree.py:346(_create_node_with_handler)
4286328 3.937 0.000 5.441 0.000 customtreectrl.py:6380(GetLineHeight)
1839413/13965 2.231 0.000 4.463 0.000 customtreectrl.py:2508(GetSize)
2613 3.032 0.001 4.278 0.002 treenodehandlers.py:90(__init__)
9308 0.070 0.000 4.259 0.000 customtreectrl.py:8389(RefreshSubtree)
38 0.004 0.000 3.764 0.099 threading.py:309(wait)
32 0.001 0.000 3.699 0.116 threading.py:902(join)
1 0.000 0.000 3.609 3.609 project.py:163(_populate_from_datafile)
22 0.111 0.005 3.415 0.155 __init__.py:16(<module>)
9308 0.027 0.000 3.409 0.000 tree.py:720(OnTreeItemExpanding)
1 0.000 0.000 3.409 3.409 project.py:170(_create_controllers)
783/1 0.001 0.000 3.409 3.409 filecontrollers.py:58(DataController)
783/1 0.002 0.000 3.409 3.409 filecontrollers.py:50(_get_controller)
355/1 0.003 0.000 3.409 3.409 filecontrollers.py:377(__init__)
793/1 0.005 0.000 3.409 3.409 filecontrollers.py:107(__init__)
Metadata
Metadata
Assignees
Labels
fixedIssues that have been fixed and can be closed already
Activity
HelioGuilherme66 commentedon Sep 20, 2019
@pakal Thanks.
That change could improve a bit, but would not resolve the root cause, which is known since around 2013 before version 1.5.2.1.
The change may cause keeping the icon animation visible.
Anyway, we will keep researching for a fix.
Nyral commentedon Sep 20, 2019
@pakal You're using an older RIDE version. Please upgrade to the latest build.
The issue you're referring to has been fixed through the PRs from this issue #1958.
There is another issue (on which you commented), where Tree Panel causes the entire operating system to hang after you scroll. This remains unresolved and we need help to figure it out.
HelioGuilherme66 commentedon Jul 6, 2020
Closing because can be tested on soon to be pre-released, v2.0b1.