A few minor fixes to make the upcoming ssb/ra0692-01 more tolerable. This form has very many components, possibly with dynamic behaviour, and simply setting data in the NodesContext is noticably slow (presumably because all selectors have to re-run).
Removed an undefined class in src/features/alertOnChange/DeleteWarningPopover.tsx
Making useLookupBinding() static. This didn't really need to re-render when DataModelsProvider changes(?). I didn't really look into the root cause for this, but I observed that <DataModelValidation /> re-rendered for all nodes when clicking a checkbox (which in turn added a row to a repeating group).
When multiple new components were discovered in the node generator, these would all call the restart() function. This only caused {} to be set in the NodesContext. This seems harmless, but it turns out setting an empty object still means all selects have to re-run, so this contributed to a very noticable slowdown when adding a row to a repeating group (which adds multiple new components).
Sadly, this form is far from optimal after these fixes, but they're low-hanging fruit.
Description
A few minor fixes to make the upcoming
ssb/ra0692-01
more tolerable. This form has very many components, possibly with dynamic behaviour, and simply setting data in theNodesContext
is noticably slow (presumably because all selectors have to re-run).src/features/alertOnChange/DeleteWarningPopover.tsx
useLookupBinding()
static. This didn't really need to re-render when DataModelsProvider changes(?). I didn't really look into the root cause for this, but I observed that<DataModelValidation />
re-rendered for all nodes when clicking a checkbox (which in turn added a row to a repeating group).restart()
function. This only caused{}
to be set in the NodesContext. This seems harmless, but it turns out setting an empty object still means all selects have to re-run, so this contributed to a very noticable slowdown when adding a row to a repeating group (which adds multiple new components).Sadly, this form is far from optimal after these fixes, but they're low-hanging fruit.
Related Issue(s)
Verification/QA
kind/*
label to this PR for proper release notes grouping