Prebid.js
Prebid.js copied to clipboard
Core: start yielding control of the main thread
Type of change
- [x] Feature
Description of change
- Make
GreedyPromiseoptional: it can be excluded withgulp build --disable GREEDYand/or overridden withpbjs.Promise = window.Promise(before Prebid loads) - Refactor tests so that they can pass on both vanilla and greedy promises
Since promises are already used in many places, "vanilla" promises should have the effect of breaking up long running tasks (https://github.com/prebid/Prebid.js/issues/10062), but they are also potentially breaking - the timing of configuration taking effect, event handlers running, etc all change (relative to when their setup code runs).
The plan is to do some testing and, if necessary, find more tasks to split using promises - so that any such change only affects those that opt out of GreedyPromise.
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
modules/consentManagementGpp.jshas 8 duplicated lines withmodules/consentManagementTcf.js
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
modules/consentManagementGpp.jshas 8 duplicated lines withmodules/consentManagementTcf.js
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
modules/consentManagementGpp.jshas 7 duplicated lines withmodules/consentManagementTcf.js
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
modules/consentManagementGpp.jshas 7 duplicated lines withmodules/consentManagementTcf.js
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
modules/consentManagementGpp.jshas 7 duplicated lines withmodules/consentManagementTcf.js
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
modules/consentManagementGpp.jshas 8 duplicated lines withmodules/consentManagementTcf.js
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀
Tread carefully! This PR adds 1 linter warning (possibly disabled through directives):
libraries/consentManagement/cmUtils.js(+1 warning)
Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:
modules/consentManagementGpp.jshas 8 duplicated lines withmodules/consentManagementTcf.js
Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀
Hi @dgirardi, are you still committed to move this branch forward?
I just wanted to share that the scheduler.yield Yield method to allow 3Ps or 1P Script led Tasks to Yield while ensuring continuation (so without causing delay into Ad bids auction) is now widely available in Chrome.
I think that may be a good fit for this branch proposal for interested publishers to test it out if applicable.
Raptive is planning some quantitative tests on this branch in November
Thanks for your answer @patmmccann!
If you have feedback or questions about yield best practices on the Yield I am available to answer those questions.
It would be interesting to test this improvement. Any news on the progress?
It would be interesting to test this improvement. Any news on the progress?
Ironically, we're awaiting people like you to test the branch on live traffic before merging it
This is ready to merge when the conflicts get cleaned up