title: Ninja Forms front-end.js long task in Chrome Performance impacting Core Web Vitals
body: <p>In Core Web Vitals, we have high Total Blocking Time and it seems the main culprit is this script in Ninja Forms.  If it is commented out, Ninja Forms does not load - obviously not a solution.  But I would love to figure out a way to stop it from impacting the load performance.</p>
  <p>This seems to be the specific code in <code>front-end.js</code> causing it:</p>
  <pre class="lang-js prettyprint-override"><code>//Simulate async callback;
  if (forceSync) {
    main(undef, deps, callback, relName);
  } else {
    //Using a non-zero value because of concern for what old browsers
    //do, and latest browsers &quot;upgrade&quot; to 4 if lower value is used:
    //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
    //If want a value immediately, use require('id') instead -- something
    //that works in almond on the global level, but not guaranteed and
    //unlikely to work in other AMD implementations.
    setTimeout(function () {
        main(undef, deps, callback, relName);
    }, 4);
  }
  
  return req;
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/YbSWj.jpg" rel="nofollow noreferrer">Code</a></p>
  <p>Performance:</p>
  <p><a href="https://i.stack.imgur.com/sJDXA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sJDXA.jpg" alt="Performance" /></a></p>