SVGHMI: More build time optimization : def_by_label now takes far less time.
--- a/svghmi/widgets_common.ysl2 Tue Feb 23 10:07:21 2021 +0100
+++ b/svghmi/widgets_common.ysl2 Wed Feb 24 15:36:37 2021 +0100
@@ -347,6 +347,7 @@
const "included_ids","$parsed_widgets/widget[not(@type = $excluded_types) and not(@id = $discardable_elements/@id)]/@id";
const "hmi_widgets","$hmi_elements[@id = $included_ids]";
+const "result_widgets","$result_svg_ns//*[@id = $hmi_widgets/@id]";
emit "declarations:hmi-elements" {
| var hmi_widgets = {
@@ -362,7 +363,7 @@
const "widget_type","@type";
foreach "str:split($labels)" {
const "name",".";
- const "elt","$result_svg_ns//*[@id = $hmi_element/@id]//*[@inkscape:label=$name][1]";
+ const "elt","$result_widgets[@id = $hmi_element/@id]//*[@inkscape:label=$name][1]";
choose {
when "not($elt/@id)" {
if "$mandatory='yes'" {