Repository navigation
Conversation
A parameter value can hold an expression, so reading it can evaluate a nested expression. Paths such as `$node["A"].parameter.ids` and `$item(0).$parameter.ids` reach that value below the first two steps, so the resolver read it again for each array element. Cache the path down to the parameter value for `$parameter` and `$node[name].parameter`, also under `$item(i)`. Keep the default depth for other paths.
There was a problem hiding this comment.
No issues found across 8 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Bounded performance fix: caches resolved host data path prefixes once per expression evaluation in QuickJS and isolated-vm, avoiding repeated re-evaluation of parameter expressions; covered by unit and integration tests.
View guided diff | Turn on auto-fix | Re-trigger cubic
5bf827c to
5736079
Compare
Bundle ReportChanges will increase total bundle size by 383 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: editor-ui-esmAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PR review overviewBased on ownership of the 8 changed files in this PR:
|
Co-Authored-By: Kimi K3.1 Pro <noreply@moonshot.ai>
despairblue
left a comment
There was a problem hiding this comment.
added more tests, rests looks nice, good work
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would not auto-approve. Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-42571-to-release-candidate/2.46.x
git worktree add --checkout .worktree/backport-42571-to-release-candidate/2.46.x backport-42571-to-release-candidate/2.46.x
cd .worktree/backport-42571-to-release-candidate/2.46.x
git reset --hard HEAD^
git cherry-pick -x d50a44698bfb08f368dad62bb9fde7e2947da396
git push --force-with-lease |
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-42571-to-release-candidate/2.45.x
git worktree add --checkout .worktree/backport-42571-to-release-candidate/2.45.x backport-42571-to-release-candidate/2.45.x
cd .worktree/backport-42571-to-release-candidate/2.45.x
git reset --hard HEAD^
git cherry-pick -x d50a44698bfb08f368dad62bb9fde7e2947da396
git push --force-with-lease |
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-42571-to-release-candidate/2.46.x
git worktree add --checkout .worktree/backport-42571-to-release-candidate/2.46.x backport-42571-to-release-candidate/2.46.x
cd .worktree/backport-42571-to-release-candidate/2.46.x
git reset --hard HEAD^
git cherry-pick -x d50a44698bfb08f368dad62bb9fde7e2947da396
git push --force-with-lease |
Summary
Reading an array from an expression parameter could repeat the same calculation for every element and cause QuickJS to time out. This PR reuses resolved host values within each evaluation.
The fix applies to both QuickJS and isolated-vm.
Why
Consider an
idsparameter that contains:Reading
{{ $parameter.ids }}looks simple. But the runtime reads array elements on demand. Each read used to resolve the path from the root, which could run the entiremap()again.The array is now resolved once and reused while its elements are read.
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/CET-540
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)