title: Performance issue with Promises, setTimeout, async/await on Edge
body: <p>Is there anything inherently wrong with the following mixed use of asnyc/await, promise, and setInterval? It's working as desired, but the performance is terrible on Edge. My test case runs in about 3.5 sec in Chrome, but takes over 2 min in Edge. Note that this is a method from a TypeScript class.</p>
  
  <pre><code>public async exportPdf(sourceGraph: IGraph, filters: EntityFilter) {
          if (sourceGraph) {
              ...snip....
              for (let verticalPageIndex = 0; verticalPageIndex &lt; pagesHighWithMargins; verticalPageIndex++) {
                  for (let horizontalPageIndex = 0; horizontalPageIndex &lt; pagesWideWithMargins; horizontalPageIndex++) {
                      // run with setTimeout so we can process other events between pages and prevent locking up the browser
                      await new Promise(resolve =&gt; setTimeout(resolve, 0)).then(async () =&gt; {
                          ...snip...
                          const svgElement = await exporter.exportSvgAsync(exportComponent) as SVGElement;
                           ....snip - expensive code to convert SVG to PDF page...
                      });
                  }
              }
  
              return jsPdf.output('datauristring');
          } else {
              return new Promise((_, reject) =&gt; {
                  reject(new Error('graph argument is null'));
              });
          }
      }
  </code></pre>
  
  <p>Obviously I'm a newbie with JS and TS, but I've been around long enough to know that mixing 3 different techniques for managing async operations is probably wrong. :-)</p>