# HG changeset patch # User Edouard Tisserant # Date 1614071241 -3600 # Node ID edd558965f585a1239c495f69914ce2864dd8b2b # Parent cecfd6bb45930e849511507a778c2b5713f16481 SVGHMI: Optimize sumarized_elements xslt function, taking most of SVGHMI build time. diff -r cecfd6bb4593 -r edd558965f58 svghmi/detachable_pages.ysl2 --- a/svghmi/detachable_pages.ysl2 Mon Feb 22 10:09:57 2021 +0100 +++ b/svghmi/detachable_pages.ysl2 Tue Feb 23 10:07:21 2021 +0100 @@ -73,14 +73,13 @@ def "func:sumarized_elements" { param "elements"; const "short_list", "$elements[not(ancestor::*/@id = $elements/@id)]"; - const "filled_groups", """$short_list/parent::svg:*[ - not(descendant::*[ - not(self::svg:g) and + const "filled_groups", """$short_list/parent::*[ + not(child::*[ not(@id = $discardable_elements/@id) and - not(@id = $short_list/descendant-or-self::*[not(self::svg:g)]/@id) + not(@id = $short_list/@id) ])]"""; const "groups_to_add", "$filled_groups[not(ancestor::*/@id = $filled_groups/@id)]"; - result "$groups_to_add | $short_list[not(ancestor::svg:g/@id = $filled_groups/@id)]"; + result "$groups_to_add | $short_list[not(ancestor::*/@id = $filled_groups/@id)]"; } def "func:detachable_elements" { diff -r cecfd6bb4593 -r edd558965f58 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Mon Feb 22 10:09:57 2021 +0100 +++ b/svghmi/gen_index_xhtml.xslt Tue Feb 23 10:07:21 2021 +0100 @@ -471,9 +471,9 @@ - + - +