-
Notifications
You must be signed in to change notification settings - Fork 3
Batch EventInspector broadcasts #4817
Description
The EventInspector broadcasts every event record individually to all subscribed WebContents. During active agent work or file watching bursts, this can produce hundreds of individual IPC sends per second to the renderer — each one triggering structured clone serialization.
Since the EventInspector is a debugging/diagnostics tool (not user-facing real-time UI), a 50-100ms batching window would have zero UX impact. Events could be accumulated into an array and flushed as a single EVENT_INSPECTOR_EVENT_BATCH message, reducing IPC volume by 90%+ during bursts.
The renderer-side handler would need to accept an array of events instead of individual events. The existing lazy subscription pattern (only subscribing to EventBuffer when a WebContents subscribes) is good and should be preserved.