Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Optimization of Prebid.js's speed

Open Heray opened this issue 11 years ago • 3 comments

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

Heray avatar Aug 19 '15 19:08 Heray

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 :)

BartVB avatar Nov 15 '15 21:11 BartVB

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.

Heray avatar Mar 29 '16 01:03 Heray

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.

BartVB avatar Mar 29 '16 09:03 BartVB