title: Nunjucks string embed at render rather than compile time
body: <p>We have a template that's taking up to 40 seconds to render which has been attributed to a JavaScript inline insertion being performed at what appears to be compile and not render time. We found this by turning cache on.</p>
  <p>The workflow 'dump' is about 2Mb.</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
    window.addEventListener('DOMContentLoaded', function () {
      var form = document.getElementById('workflow');
      window.app.caseSection(form, '{{ workflow | dump }}');
    });
  &lt;/script&gt;
  </code></pre>
  <p>One option is to abort the approach entirely and load the data later via ajax. Is there another way to solve it inline?</p>