Remove debug collection from compiled function calls
This will hopefully provide a performance boost, and is a cheap optimization to make. The information it collected was pretty useless in practice. * src/current/compiler/js-calc.xsl (compile) [c:*]: Do not encase calculations with function ancestors in debug collection functions.master v2.2.0
parent
666b9d6a97
commit
d1dbea91ac
|
@ -60,7 +60,13 @@
|
|||
</template>
|
||||
|
||||
|
||||
<template match="c:*" mode="compile" priority="1">
|
||||
<!--
|
||||
Compile calculations with debug information. This collects the
|
||||
result of the calculation, allowing for extremely fine-grained
|
||||
recursive study of a calculation.
|
||||
-->
|
||||
<template mode="compile" priority="1"
|
||||
match="c:*">
|
||||
<if test="$calcc-debug = 'yes'">
|
||||
<text>( function() { var result = </text>
|
||||
</if>
|
||||
|
@ -81,6 +87,18 @@
|
|||
</template>
|
||||
|
||||
|
||||
<!--
|
||||
Functions are invoked many times and providing information about
|
||||
each of their invocations is of limited use, so they should not
|
||||
collect debug information. This saves a lot of time and memory,
|
||||
and hopefully allows JIT engines to better optimize.
|
||||
-->
|
||||
<template mode="compile" priority="7"
|
||||
match="c:*[ ancestor::lv:function ]">
|
||||
<apply-templates select="." mode="compile-pre" />
|
||||
</template>
|
||||
|
||||
|
||||
<!--
|
||||
Begins compilation of a calculation
|
||||
|
||||
|
|
Loading…
Reference in New Issue