I face a performance issue in the editor when using change node with several rules.
To reproduce the "issue":
- simply create a change node with 10 to 15 rules inside (just keep default created rules and edit string payload to random string) like so:
- close the panel,
- and open it again.
The panel opening takes a lot of times and the duration is directly correlated to the number of rules.
Also when resizing the panel, the refresh is quite long ...
The chrome debug tool shows that the
addItem function from
editableList (= add one rule) takes between 150ms to 250ms which seems very to me.
I figure out that removing all the
typedInput fields (x5 per rule) in the the
addItem function, fixes the performance issue.
Is it something to consider as normal in term of performance ?
It certainly looks like something that needs to be improved.
In 1.0 there was a performance improvement for the Switch node that reduces the number of typedInputs that are created - only creating those that are needed as and when they are needed - https://github.com/node-red/node-red/commit/c8e14f91e749aeb2bd4804181900f1fcdfaef1b8
A similar change is needed in the Change node.
I just performed the same improvements on change node. It slightly improves the situation but still it's not perfect as there still (at least) 2 typedInput for each rule.
I also noticed some performance issue when resizing the panel width so I changed the way the "rule" width is processed. The performances are much better now when resizing.
Would you like me to raise a pull-request such as you can review my proposal and merge it if no problem ?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.