Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
I usually have to work with complex switch nodes (>10 cases) and it is very slow whenever I open their configuration (~1-2 secs).
It seems it renders the typed fields eagerly, even without user interaction. It then chooses to hide and show certain DOM elements that were previously created based on the rule.
For complex switch node, this eager rendering results in tedious wait time even though the rules are very simple.
I'm proposing a simple lazy rendering of these fields to improve the load time of this node's configuration. Here we only render these fields on demand when the user choose to do so (e.g. select the rule).
With this approach, the performance could be significantly improved (tested with Chrome performance profiling, it improves load time for complex switch nodes from ~1.3 secs to ~0.6 secs ).
Checklist
grunt
to verify the unit tests pass