New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Audit 2017: Loader Snippet Performance in Edge #163

Open
nicjansma opened this Issue Dec 22, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@nicjansma

nicjansma commented Dec 22, 2017

We've found that the Boomerang Loader Snippet performs significantly worse in Edge:

image

Bug against the Edge team: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15194745/

The main cost is in the document.open() / .write() / .close():

  doc.open()._l = function() {
    var js = this.createElement("script");
    if(dom) this.domain = dom;
    js.id = "boomr-if-as";
    js.src = 'http://your-cdn.host.com/path/to/boomerang-<version>.js';
    this.body.appendChild(js);
  };
  doc.write('<body onload="document._l();">');
  doc.close();

With the above code, the snippet takes ~66ms on my desktop. Without the above document.open/write/close(), the Edge snippet takes only 4ms.

We should investigate if there's another way of injecting Boomerang in Edge that is more performant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment