Fix the Triage Summary view's exports list to only update when visible#7071
Conversation
|
Implementation looks good. Additional context (informational only):
Additionally, it's possible to completely unregister from |
plafosse
left a comment
There was a problem hiding this comment.
I'm approving but I left a couple of comments on some potential improvements. Address those comments if you agree with them and then merge.
The `ExportsTreeView` now asks the model to pause / resume updates when its visibility changes. When paused, all notifications from the view are ignored. When resumed, notifications set a flag to indicate that an update is needed and resume the update timer if it is not already active. The timer is stopped after an update is processed. There's some extra complexity here to avoid emitting a signal for every `BinaryView` notification that is processed. These notifications are typically generated on background threads. The overhead of emitting a signal and it being routed to the main thread adds up given the number of notifications involved when loading a large binary.
8ce4c6d to
ebac408
Compare
The
ExportsTreeViewnow asks the model to pause / resume updates when its visibility changes. When paused, all notifications from the view are ignored. When resumed, notifications set a flag to indicate that an update is needed and resume the update timer if it is not already active. The timer is stopped after an update is processed.There's some extra complexity here to avoid emitting a signal for every
BinaryViewnotification that is processed. These notifications are typically generated on background threads. The overhead of emitting a signal and it being routed to the main thread adds up given the number of notifications involved when loading a large binary. This manifests on macOS as time being spent insideCFRunLoopWakeUp.