Mike Gerwitz

Activist for User Freedom

diff options
authorMike Gerwitz <gerwitzm@lovullo.com>2017-07-18 10:14:22 -0400
committerMike Gerwitz <gerwitzm@lovullo.com>2017-07-18 10:14:22 -0400
commitd1dbea91acbeb83ed1d794a74e30c57bf9163ebf (patch)
parent666b9d6a978afc1a0b76a9080a671f327f94b89b (diff)
Remove debug collection from compiled function callsv2.2.0
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.
1 files changed, 19 insertions, 1 deletions
diff --git a/src/current/compiler/js-calc.xsl b/src/current/compiler/js-calc.xsl
index e3f91ae..d2d0073 100644
--- a/src/current/compiler/js-calc.xsl
+++ b/src/current/compiler/js-calc.xsl
@@ -60,7 +60,13 @@
-<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>
@@ -82,6 +88,18 @@
+ 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" />
Begins compilation of a calculation
This is responsible for wrapping the value to enforce precedence rules and