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

Load prebid and GPT libraries in parallel #276

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

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

This comment has been minimized.

Show comment
Hide comment
@mkendall07

mkendall07 Mar 29, 2016

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!

Collaborator

mkendall07 commented Mar 29, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@pdramos1

pdramos1 Apr 5, 2016

Collaborator

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

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

This comment has been minimized.

Show comment
Hide comment
@mkendall07

mkendall07 Apr 5, 2016

Collaborator

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

Collaborator

mkendall07 commented Apr 5, 2016

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

@pdramos1

This comment has been minimized.

Show comment
Hide comment
@pdramos1

pdramos1 Apr 5, 2016

Collaborator

just saw that!

Collaborator

pdramos1 commented Apr 5, 2016

just saw that!

@protonate

This comment has been minimized.

Show comment
Hide comment
@protonate

protonate Apr 15, 2016

Collaborator

Released with 0.8.0

Collaborator

protonate commented Apr 15, 2016

Released with 0.8.0

@protonate protonate closed this Apr 15, 2016

mohit546 pushed a commit to mohit546/Prebid.js that referenced this issue Jun 21, 2018

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