Creating it is quite heavy and not needed for showing the overview.
With ~20 rules I still can see a noticeable lag, although it's slightly better.
I think the main time consuming operation is the conversion between RuleSettings and Rules objects.
This happens in two interfaces, once on general loading/saving: RuleBookSettings->rules(), and the other on editing/saving a specific rule.
I'd like to try handling RuleSettings objects directly to see if it reduces the loading/editing times.
About this particular improvement, I'd also like to go for it but there is the problem of where to register the qml types.
Would a specific file guarded by #ifdef work to execute this lines depending on the executable?
kwin_rules_dialog (launching from the appmenu) needs a full re-write anyway, since it's a QML/QWidget frankestein and also doesn't work on wayland (https://bugs.kde.org/show_bug.cgi?id=421405)
There is a problem moving this out of here, in that kwin_rules_dialog executable will not find it.