Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
928 stars 209 forks source link

Excessive Resource Utilization with Many Panes for Large Files #4586

Closed bpotchik closed 9 months ago

bpotchik commented 1 year ago

Version and Platform (required):

Bug Description: Currently, we are creating SideBar / UI view-sensitive widgets per ViewFrame instance, or in other words per pane window. As a result, if you have several panes open, all on the same BinaryView instance, then there are instances of each sidebar widget for each pane. In the case of a widget like SymbolsList/Components, this can lead to excessive resource utilization when using many panes, since there will be a widget per pane.

I believe the intended view-sensitive widget instance lifetime should be tied to a (FileContext, BinaryView, set). Prior to the new Pane system, the association of a ViewFrame lifetime to the lifetimes of the UI widgets that it creates was ok, since there was only one ViewFrame instance.

For now the following commits to resolve this instance lifetime issue have been reverted. There currently exist many UI widgets that stash a pointer to the ViewFrame instance that created it, without ever updating that ViewFrame instance when notifyViewChanged(...) is called. All of these widgets will need to be updated, in combination with the commits below to resolve this issue.

binaryninja - 0f844a8221c8baa329dad4f10710af86f5004c94 binaryninja-api - a693c795f73686eb8901eeb70e252b9ca796049d

plafosse commented 9 months ago

Fixed in 4.0