Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2020-01-21 00:02:16 -0500
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-01-22 16:31:16 -0500
commit7a2ce00ed57ec4711c38e4a46ddad9cda9a4455f (patch)
treefe6ba633691929a7c14ec7c80829d496b290b41a /src
parent46d5ed286c547c961911d5c756bbc38aa7b66d9f (diff)
downloadtame-7a2ce00ed57ec4711c38e4a46ddad9cda9a4455f.tar.gz
tame-7a2ce00ed57ec4711c38e4a46ddad9cda9a4455f.tar.bz2
tame-7a2ce00ed57ec4711c38e4a46ddad9cda9a4455f.zip
src/current/compiler/js.xsl: Remove inline defaults for anyValue
This not only reduces file size, but also has a significant performance benefit for the UI, which is almost entirely classifications. A run for one of our systems was reduced from 1m30s to 11s from this change.
Diffstat (limited to 'src')
-rw-r--r--src/current/compiler/js.xsl20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/current/compiler/js.xsl b/src/current/compiler/js.xsl
index fe6d5a5..cba8678 100644
--- a/src/current/compiler/js.xsl
+++ b/src/current/compiler/js.xsl
@@ -560,7 +560,15 @@
<value-of select="$compiler:nl" />
+ <variable name="dest">
+ <text>args['</text>
+ <value-of select="@yields" />
+ <text>']</text>
+ </variable>
+
<if test="not( $noclass )">
+ <sequence select="concat( $dest, '=[];', $compiler:nl )" />
+
<if test="@preproc:generated='true'">
<text>gen</text>
</if>
@@ -582,12 +590,6 @@
select="for $match in $criteria
return $symtable-map( $match/@on )" />
- <variable name="dest">
- <text>args['</text>
- <value-of select="@yields" />
- <text>']</text>
- </variable>
-
<!-- generate boolean value from match expressions -->
<choose>
<!-- if classification criteria were provided, then use them -->
@@ -852,11 +854,9 @@
</otherwise>
</choose>
- <text>, ( </text>
- <value-of select="$yieldto" />
- <text> || ( </text>
+ <text>, </text>
<value-of select="$yieldto" />
- <text> = [] ) ), </text>
+ <text>, </text>
<!-- if this match is part of a classification that should yield a matrix,
then force a matrix set -->