n8n
n8n copied to clipboard
fix(editor): Debounce all parameter updates to minimise new workflow instance creation
Summary
Currently, a new Workflow
class instance is being created every time a node parameter is updated. This creates performance issues in the editor since this is fired too often (for example, on each key stroke in node parameter input).
While proper solution is implemented (refactoring central workflow instance), this PR introduces a 300ms debounce to valueUpdated
event which should minimize the number of new objects and free up some resources on the main thread.
Related tickets and issues
Fixes ADO-1524
Review / Merge checklist
- [x] PR title and summary are descriptive. Remember, the title automatically goes into the changelog. Use
(no-changelog)
otherwise. (conventions) - [ ] Docs updated or follow-up ticket created.
- [ ] Tests included.
A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests.
:warning: Some Cypress E2E specs are failing, please fix them before merging
:warning: Some Cypress E2E specs are failing, please fix them before merging
Closing for now since the debounce breaks other stuff and we are laying out the plan for a proper fix.