prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.33k stars 2.08k forks source link

Optimization of Prebid.js's speed #31

Closed Heray closed 8 years ago

Heray commented 9 years ago

I noticed there's a 30-50ms lag between when Prebid.js finished loading and when the first pre-bid calls are initiated.

screen shot 2015-08-19 at 3 08 09 pm

This is a Chrome capture on page: http://prebid.org/header-bidding-demo.html

BartVB commented 8 years ago

Same here. But as far as I can tell this is your browser parsing the Javascript.

Google Chrome gpt/prebid timeline

I'm not exactly a prebid.js or Javascript expert but I think it should be possible to reduce this parsing time by helping the JS engines a bit. This seems to be a useful article: http://ariya.ofilabs.com/2012/07/lazy-parsing-in-javascript-engines.html Or this older article: http://googlecode.blogspot.nl/2009/09/gmail-for-mobile-html5-series-reducing.html Not very elegant but functional :)

Heray commented 8 years ago

Thanks @BartVB ! We are adding a new feature (coming up soon), that allows Prebid to inform GPT send out the impression immediately after the timeout hits, without having to wait for GPT to load. Closing the ticket for now.

BartVB commented 8 years ago

That's great and this would really help reduce latency on a page level, but it would still be really nice if it were possible to make prebid.js faster. Eliminating redundant adapters resulted in a big improvement for us.