Skip to content
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

Compiler UI for selectively choosing embedded adaptors #121

Closed
prebid opened this issue Dec 1, 2015 · 6 comments
Closed

Compiler UI for selectively choosing embedded adaptors #121

prebid opened this issue Dec 1, 2015 · 6 comments
Assignees

Comments

@prebid
Copy link
Collaborator

prebid commented Dec 1, 2015

As a publisher, I'd like to have prebid.js only include required bidder adaptors, so that I don't have to load up adaptors that are not relevant to me.

*Note that today prebid.js is only 15KB, so this has not become a concern yet. But please leave your comments if you think otherwise or see other problems. Thanks!

@BartVB
Copy link
Contributor

BartVB commented Dec 5, 2015

I'm already doing this which has reduced my prebid.min.js to 9k gzipped. In the end every byte that needs to be loaded for header bidding makes the display of creatives slower which results in a worse user experience and lower revenue.

Besides that size is not the only argument. Parsing and running prebid.js takes quite a bit of time, removing redundant code helps with keeping the pages fast (or helps with reducing the slowdown).

@nickjacob
Copy link
Collaborator

I've done a similar thing on my branch -- I added gulp-preprocess and changed my src/adaptermanager to look like this:

/* @ifndef excludes.rubicon */
var RubiconAdapter = require('./adapters/rubicon.js');
this.registerBidAdapter(RubiconAdapter(), 'rubicon');
/* @endif */
/* @ifndef excludes.appnexus */
var AppNexusAdapter = require('./adapters/appnexus.js');
this.registerBidAdapter(AppNexusAdapter(), 'appnexus');
/* @endif */
/* @ifndef excludes.openx */
var OpenxAdapter = require('./adapters/openx');
this.registerBidAdapter(OpenxAdapter(), 'openx');
/* @endif */
/* @ifndef excludes.pubmatic */
var PubmaticAdapter = require('./adapters/pubmatic.js');
this.registerBidAdapter(PubmaticAdapter(), 'pubmatic');
/* @endif */

in my gulpfile I added a preprocess task as the first dependency to build-dev, which does something like:

preprocess({
  excludes: {
    index: true,
    rubicon: true
  }
});

Not sure if this is the best way to do this, but would make it pretty easy to add a web UI to download a custom bundle, just need to set the excludes with query/form params from the client

@mkendall07
Copy link
Member

Thanks for the idea @nickjacob . I think that's a good solution because it will omit the adapter sources if browserify doesn't see the require statement.

@BartVB
Copy link
Contributor

BartVB commented Jan 12, 2016

Small suggestion; I would prefer a config with 'include' instead of 'exclude'. Easier to work with without the negation.

@protonate
Copy link
Collaborator

PR #220 provides for an adapters array in package.json to specify what adapters will be built.

@protonate
Copy link
Collaborator

#220 was merged and released with Prebid 0.7.0. Closing.

vzhukovsky added a commit to aol/Prebid.js that referenced this issue Oct 12, 2017
….28.0 to aolgithub-master

* commit '4d9ade3df767750743f8888ed9efd6c77f8d0050': (26 commits)
  Added changelog entry.
  Added new aol partners ids.
  Prebid 0.28.0 Release
  Revert "Upgrade sinon to 3.x (prebid#1491)" (prebid#1563)
  add () for correct order of operations in scaling increments for currency (prebid#1559)
  AppnexusAst adapter update: Added source and version to request payload (prebid#1555)
  remove unnecessary spread operator (prebid#1561)
  Adxcg adapter (prebid#1554)
  Upgrade sinon to 3.x (prebid#1491)
  Rename vastPayload to vastXml (prebid#1556)
  Single-size sizes array now can be taken, too (prebid#1535)
  Updated the istanbul-instrumenter-loader (prebid#1550)
  Add AerServ Adapter (prebid#1538)
  Fixed imports and made adform support aliasing (prebid#1518)
  Custom granularity fix (prebid#1546)
  Fix `documentation lint` issues (prebid#1544)
  Yieldbot adunit bidder params slot name usage fix (prebid#1394)
  Update serverbid adapter to use smartsync (prebid#1324)
  Add improvedigitalBidAdapter (prebid#1381)
  Fix prebid#1533 spring server typo (prebid#1542)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants