mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-27 19:15:01 +02:00
The progress stream forwarded from a sub-workflow to the parent's canvas was effectively unthrottled. The previous guard only suppressed consecutive `nodeExecuteBefore` events for the same node with no intervening `nodeExecuteAfter` — a sequence the engine does not produce — so steady state was two messages per child node execution. Each of those is a pubsub broadcast in scaling mode and a full canvas re-map in the editor, so a looping child workflow could emit thousands of messages for one run. Replace it with a trailing-edge throttle: the leading edge still emits immediately so the overlay appears at once, subsequent events inside the window coalesce into a single pending snapshot, and a trailing timer sends the latest state. The overlay only renders the running node name, an "X / Y" counter and a bar, so intermediate states are disposable. A 200-iteration child now emits two messages instead of ~400. `workflowExecuteAfter` drops any pending snapshot, since the finished event clears the overlay outright. Also stop forwarding progress for nested sub-workflows. Only the workflow open on the canvas renders the overlay, so a grandchild's parent node is not on screen and the editor discarded those messages anyway. Resolving the direct parent's pushRef instead of walking the whole ancestor chain removes that wasted traffic and simplifies the lookup. Tests now exercise real engine before/after sequences rather than the synthetic double-`nodeExecuteBefore` the old throttle keyed on. Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| templates | ||
| test | ||
| AGENTS.md | ||
| BREAKING-CHANGES.md | ||
| eslint.config.mjs | ||
| nodemon.json | ||
| package.json | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| vitest.config.base.ts | ||
| vitest.config.integration.testcontainers.ts | ||
| vitest.config.integration.ts | ||
| vitest.config.migration.testcontainers.ts | ||
| vitest.config.migration.ts | ||
| vitest.config.ts | ||
| vitest.tsc-entity-transform.ts | ||
| vitest.workspace-externals.ts | ||