Load prebid and GPT libraries in parallel #276

Closed
BartVB opened this Issue Mar 29, 2016 · 5 comments

Projects

None yet

4 participants

@BartVB
Contributor
BartVB commented Mar 29, 2016

When implementing prebid.org I didn't like the fact that GPT was only loaded after all the bids were back. This resulted in a browser that was idly waiting for bid responses while it could be loading and parsing the GPT libraries.

It was fairly trivial to change this behaviour. I changed this example:
http://prebid.org/dev-docs/examples/basic-example.html

to what I have been using for a couple of months now:
http://jsfiddle.net/48pLvsqw/1/

The main changes:

  • Add googletag.pubads().disableInitialLoad(); before googletag.enableServices();
  • Remove loading GPT from initAdserver()
  • Call googletag.pubads().refresh(); in initAdserver()

This has been working flawlessly for me and this results in a rather nice speed boost because loading, parsing and running GPT takes quite a bit of time.

@mkendall07
Collaborator

@BartVB
We've been looking into this ourselves and trying to solve. Looks like we missed googletag.pubads().disableInitialLoad();. Thanks so much for pointing it out! We'll be working on updating our examples!

@protonate protonate self-assigned this Mar 31, 2016
@pdramos1
Collaborator
pdramos1 commented Apr 5, 2016

+1 here for seeing the solution. We are looking at this as well from our end at sovrn. Excited to see the end result.

@mkendall07
Collaborator

There is a PR for this. Should be merged today > #288

@pdramos1
Collaborator
pdramos1 commented Apr 5, 2016

just saw that!

@protonate
Contributor

Released with 0.8.0

@protonate protonate closed this Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment