# HG changeset patch # User Edouard Tisserant # Date 1614177397 -3600 # Node ID fbe1ffaa56cfe7897e36676bad5f03a113bfed17 # Parent edd558965f585a1239c495f69914ce2864dd8b2b SVGHMI: More build time optimization : def_by_label now takes far less time. diff -r edd558965f58 -r fbe1ffaa56cf svghmi/widgets_common.ysl2 --- 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'" {