Skip to content

Instantly share code, notes, and snippets.

@ebruchez
Last active March 11, 2025 23:25
Show Gist options
  • Save ebruchez/a06a60973eb6f119a2cdbc474cab5f71 to your computer and use it in GitHub Desktop.
Save ebruchez/a06a60973eb6f119a2cdbc474cab5f71 to your computer and use it in GitHub Desktop.
Formula with a sum of 28 variables takes minutes to compile #5948
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:map="http://www.w3.org/2005/xpath-functions/map"
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
xmlns:sql="http://orbeon.org/oxf/xml/sql"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder">
<xh:head>
<xf:model id="fr-form-model" xxf:expose-xpath-types="true" xxf:analysis.calculate="true">
<!-- Main instance -->
<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
<form>
<section-1>
<grid-1>
<control-1/>
<control-2/>
<control-3/>
<control-4/>
<control-5/>
<control-6/>
<control-7/>
<control-8/>
<control-9/>
<control-10/>
<control-11/>
<control-12/>
<control-13/>
<control-14/>
<control-15/>
<control-16/>
<control-17/>
<control-18/>
<control-19/>
<control-20/>
<control-21/>
<control-22/>
<control-23/>
<control-24/>
<control-25/>
<control-26/>
<control-27/>
<control-28/>
<control-29/>
<control-30/>
</grid-1>
</section-1>
<section-2>
<grid-2>
<out/>
</grid-2>
</section-2>
</form>
</xf:instance>
<!-- Bindings -->
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
<xf:bind id="section-1-bind" name="section-1" ref="section-1">
<xf:bind id="grid-1-bind" ref="grid-1" name="grid-1">
<xf:bind id="control-1-bind" ref="control-1" name="control-1" xxf:whitespace="trim"/>
<xf:bind id="control-2-bind" ref="control-2" name="control-2" xxf:whitespace="trim"/>
<xf:bind id="control-3-bind" ref="control-3" name="control-3" xxf:whitespace="trim"/>
<xf:bind id="control-4-bind" ref="control-4" name="control-4" xxf:whitespace="trim"/>
<xf:bind id="control-5-bind" ref="control-5" name="control-5" xxf:whitespace="trim"/>
<xf:bind id="control-6-bind" ref="control-6" name="control-6" xxf:whitespace="trim"/>
<xf:bind id="control-7-bind" ref="control-7" name="control-7" xxf:whitespace="trim"/>
<xf:bind id="control-8-bind" ref="control-8" name="control-8" xxf:whitespace="trim"/>
<xf:bind id="control-9-bind" ref="control-9" name="control-9" xxf:whitespace="trim"/>
<xf:bind id="control-10-bind" ref="control-10" name="control-10" xxf:whitespace="trim"/>
<xf:bind id="control-11-bind" ref="control-11" name="control-11" xxf:whitespace="trim"/>
<xf:bind id="control-12-bind" ref="control-12" name="control-12" xxf:whitespace="trim"/>
<xf:bind id="control-13-bind" ref="control-13" name="control-13" xxf:whitespace="trim"/>
<xf:bind id="control-14-bind" ref="control-14" name="control-14" xxf:whitespace="trim"/>
<xf:bind id="control-15-bind" ref="control-15" name="control-15" xxf:whitespace="trim"/>
<xf:bind id="control-16-bind" ref="control-16" name="control-16" xxf:whitespace="trim"/>
<xf:bind id="control-17-bind" ref="control-17" name="control-17" xxf:whitespace="trim"/>
<xf:bind id="control-18-bind" ref="control-18" name="control-18" xxf:whitespace="trim"/>
<xf:bind id="control-19-bind" ref="control-19" name="control-19" xxf:whitespace="trim"/>
<xf:bind id="control-20-bind" ref="control-20" name="control-20" xxf:whitespace="trim"/>
<xf:bind id="control-21-bind" ref="control-21" name="control-21" xxf:whitespace="trim"/>
<xf:bind id="control-22-bind" ref="control-22" name="control-22" xxf:whitespace="trim"/>
<xf:bind id="control-23-bind" ref="control-23" name="control-23" xxf:whitespace="trim"/>
<xf:bind id="control-24-bind" ref="control-24" name="control-24" xxf:whitespace="trim"/>
<xf:bind id="control-25-bind" ref="control-25" name="control-25" xxf:whitespace="trim"/>
<xf:bind id="control-26-bind" ref="control-26" name="control-26" xxf:whitespace="trim"/>
<xf:bind id="control-27-bind" ref="control-27" name="control-27" xxf:whitespace="trim"/>
<xf:bind id="control-28-bind" ref="control-28" name="control-28" xxf:whitespace="trim"/>
<xf:bind id="control-29-bind" ref="control-29" name="control-29" xxf:whitespace="trim"/>
<xf:bind id="control-30-bind" ref="control-30" name="control-30" xxf:whitespace="trim"/>
</xf:bind>
</xf:bind>
<xf:bind id="section-2-bind" ref="section-2" name="section-2">
<xf:bind id="grid-2-bind" ref="grid-2" name="grid-2">
<xf:bind id="out-bind" ref="out" name="out"
calculate="$control-1&#xA;+ $control-2&#xA;+ $control-3&#xA;+ $control-4&#xA;+ $control-5&#xA;+ $control-6&#xA;+ $control-7&#xA;+ $control-8&#xA;+ $control-9&#xA;+ $control-10&#xA;+ $control-11&#xA;+ $control-12&#xA;+ $control-13&#xA;+ $control-14&#xA;+ $control-15&#xA;+ $control-16&#xA;+ $control-17&#xA;+ $control-18&#xA;+ $control-19&#xA;+ $control-20&#xA;+ $control-21&#xA;+ $control-22&#xA;+ $control-23&#xA;+ $control-24"
readonly="false()"/>
</xf:bind>
</xf:bind>
</xf:bind>
<!-- Metadata -->
<xf:instance id="fr-form-metadata" xxf:readonly="true" xxf:exclude-result-prefixes="#all">
<metadata>
<application-name>issue</application-name>
<form-name>5948</form-name>
<title xml:lang="en">Formula with a sum of 28 variables takes minutes to compile #5948</title>
<description xml:lang="en"/>
<library-versions>
<_>1</_>
<orbeon>1</orbeon>
</library-versions>
<created-with-version>2024.1-SNAPSHOT PE</created-with-version>
<email>
<templates>
<template name="default">
<headers/>
<exclude-from-all-control-values/>
</template>
</templates>
<parameters/>
</email>
</metadata>
</xf:instance>
<!-- Attachments -->
<xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
<attachments/>
</xf:instance>
<!-- All form resources -->
<xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all">
<resources>
<resource xml:lang="en">
<out>
<label/>
<hint/>
</out>
<control-1>
<label/>
<hint/>
</control-1>
<control-2>
<label/>
<hint/>
</control-2>
<control-3>
<label/>
<hint/>
</control-3>
<control-4>
<label/>
<hint/>
</control-4>
<control-5>
<label/>
<hint/>
</control-5>
<control-6>
<label/>
<hint/>
</control-6>
<control-7>
<label/>
<hint/>
</control-7>
<control-8>
<label/>
<hint/>
</control-8>
<control-9>
<label/>
<hint/>
</control-9>
<control-10>
<label/>
<hint/>
</control-10>
<control-11>
<label/>
<hint/>
</control-11>
<control-12>
<label/>
<hint/>
</control-12>
<control-13>
<label/>
<hint/>
</control-13>
<control-14>
<label/>
<hint/>
</control-14>
<control-15>
<label/>
<hint/>
</control-15>
<control-16>
<label/>
<hint/>
</control-16>
<control-17>
<label/>
<hint/>
</control-17>
<control-18>
<label/>
<hint/>
</control-18>
<control-19>
<label/>
<hint/>
</control-19>
<control-20>
<label/>
<hint/>
</control-20>
<control-21>
<label/>
<hint/>
</control-21>
<control-22>
<label/>
<hint/>
</control-22>
<control-23>
<label/>
<hint/>
</control-23>
<control-24>
<label/>
<hint/>
</control-24>
<control-25>
<label/>
<hint/>
</control-25>
<control-26>
<label/>
<hint/>
</control-26>
<control-27>
<label/>
<hint/>
</control-27>
<control-28>
<label/>
<hint/>
</control-28>
<control-29>
<label/>
<hint/>
</control-29>
<control-30>
<label/>
<hint/>
</control-30>
<section-1>
<label/>
</section-1>
<section-2>
<label/>
<help/>
</section-2>
</resource>
</resources>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<fr:view>
<fr:body xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:xbl="http://www.w3.org/ns/xbl">
<fr:section id="section-1-section" bind="section-1-bind">
<fr:grid id="grid-1-grid" bind="grid-1-bind">
<fr:c y="1" x="1" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-1-control"
bind="control-1-bind">
<xf:label ref="$form-resources/control-1/label"/>
<xf:hint ref="$form-resources/control-1/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c y="1" x="7" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-2-control"
bind="control-2-bind">
<xf:label ref="$form-resources/control-2/label"/>
<xf:hint ref="$form-resources/control-2/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="2" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-3-control"
bind="control-3-bind">
<xf:label ref="$form-resources/control-3/label"/>
<xf:hint ref="$form-resources/control-3/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="2" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-4-control"
bind="control-4-bind">
<xf:label ref="$form-resources/control-4/label"/>
<xf:hint ref="$form-resources/control-4/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="3" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-5-control"
bind="control-5-bind">
<xf:label ref="$form-resources/control-5/label"/>
<xf:hint ref="$form-resources/control-5/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="3" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-6-control"
bind="control-6-bind">
<xf:label ref="$form-resources/control-6/label"/>
<xf:hint ref="$form-resources/control-6/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="4" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-7-control"
bind="control-7-bind">
<xf:label ref="$form-resources/control-7/label"/>
<xf:hint ref="$form-resources/control-7/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="4" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-8-control"
bind="control-8-bind">
<xf:label ref="$form-resources/control-8/label"/>
<xf:hint ref="$form-resources/control-8/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="5" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-9-control"
bind="control-9-bind">
<xf:label ref="$form-resources/control-9/label"/>
<xf:hint ref="$form-resources/control-9/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="5" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-10-control"
bind="control-10-bind">
<xf:label ref="$form-resources/control-10/label"/>
<xf:hint ref="$form-resources/control-10/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="6" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-11-control"
bind="control-11-bind">
<xf:label ref="$form-resources/control-11/label"/>
<xf:hint ref="$form-resources/control-11/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="6" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-12-control"
bind="control-12-bind">
<xf:label ref="$form-resources/control-12/label"/>
<xf:hint ref="$form-resources/control-12/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="7" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-13-control"
bind="control-13-bind">
<xf:label ref="$form-resources/control-13/label"/>
<xf:hint ref="$form-resources/control-13/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="7" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-14-control"
bind="control-14-bind">
<xf:label ref="$form-resources/control-14/label"/>
<xf:hint ref="$form-resources/control-14/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="8" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-15-control"
bind="control-15-bind">
<xf:label ref="$form-resources/control-15/label"/>
<xf:hint ref="$form-resources/control-15/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="8" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-16-control"
bind="control-16-bind">
<xf:label ref="$form-resources/control-16/label"/>
<xf:hint ref="$form-resources/control-16/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="9" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-17-control"
bind="control-17-bind">
<xf:label ref="$form-resources/control-17/label"/>
<xf:hint ref="$form-resources/control-17/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="9" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-18-control"
bind="control-18-bind">
<xf:label ref="$form-resources/control-18/label"/>
<xf:hint ref="$form-resources/control-18/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="10" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-19-control"
bind="control-19-bind">
<xf:label ref="$form-resources/control-19/label"/>
<xf:hint ref="$form-resources/control-19/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="10" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-20-control"
bind="control-20-bind">
<xf:label ref="$form-resources/control-20/label"/>
<xf:hint ref="$form-resources/control-20/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="11" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-21-control"
bind="control-21-bind">
<xf:label ref="$form-resources/control-21/label"/>
<xf:hint ref="$form-resources/control-21/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="11" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-22-control"
bind="control-22-bind">
<xf:label ref="$form-resources/control-22/label"/>
<xf:hint ref="$form-resources/control-22/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="12" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-23-control"
bind="control-23-bind">
<xf:label ref="$form-resources/control-23/label"/>
<xf:hint ref="$form-resources/control-23/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="12" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-24-control"
bind="control-24-bind">
<xf:label ref="$form-resources/control-24/label"/>
<xf:hint ref="$form-resources/control-24/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="13" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-25-control"
bind="control-25-bind">
<xf:label ref="$form-resources/control-25/label"/>
<xf:hint ref="$form-resources/control-25/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="13" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-26-control"
bind="control-26-bind">
<xf:label ref="$form-resources/control-26/label"/>
<xf:hint ref="$form-resources/control-26/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="14" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-27-control"
bind="control-27-bind">
<xf:label ref="$form-resources/control-27/label"/>
<xf:hint ref="$form-resources/control-27/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="14" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-28-control"
bind="control-28-bind">
<xf:label ref="$form-resources/control-28/label"/>
<xf:hint ref="$form-resources/control-28/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="1" y="15" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-29-control"
bind="control-29-bind">
<xf:label ref="$form-resources/control-29/label"/>
<xf:hint ref="$form-resources/control-29/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="7" y="15" w="6">
<xf:input xmlns="http://orbeon.org/oxf/xml/form-builder" id="control-30-control"
bind="control-30-bind">
<xf:label ref="$form-resources/control-30/label"/>
<xf:hint ref="$form-resources/control-30/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
</fr:grid>
</fr:section>
<fr:section id="section-2-section" bind="section-2-bind">
<fr:grid id="grid-2-grid" bind="grid-2-bind">
<fr:c x="1" y="1" w="6">
<xf:output xmlns="http://orbeon.org/oxf/xml/form-builder" id="out-control" bind="out-bind">
<xf:label ref="$form-resources/out/label"/>
<xf:hint ref="$form-resources/out/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:output>
</fr:c>
<fr:c x="7" y="1" w="6"/>
</fr:grid>
</fr:section>
</fr:body>
</fr:view>
</xh:body>
</xh:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment