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
The event subscription system triggers multiple redundant computations due to overlapping callbacks. For example, the Patches tool's update function is subscribed to both 'reset' and 'target_change' events:
@RFTool.on_reset@RFTool.on_target_changedefupdate(self):
# This gets called twice during initializationself._recompute() # Heavy computation
During initialization, both events are triggered separately:
As another example, some tools may compute in background when navigating the view, making the navigation feel laggy (even when it seems to be mechanisms to try to avoid that).
Implications
Redundant computations. Same code runs multiple times in-a-row.
Proposed Solution
Unified Event System:
Combine related callbacks to prevent duplicate computations.
Implement a smarter event system that can detect and prevent redundant calls.
Add event priority/ordering to ensure efficient execution.
The text was updated successfully, but these errors were encountered:
Event System and Redundant Callback Executions
Related issues: #1246
The event subscription system triggers multiple redundant computations due to overlapping callbacks. For example, the Patches tool's update function is subscribed to both 'reset' and 'target_change' events:
During initialization, both events are triggered separately:
As another example, some tools may compute in background when navigating the view, making the navigation feel laggy (even when it seems to be mechanisms to try to avoid that).
Implications
Proposed Solution
Unified Event System:
The text was updated successfully, but these errors were encountered: