Skip to content

Conversation

@dgirardi
Copy link
Collaborator

@dgirardi dgirardi commented Aug 20, 2025

Type of change

  • Bugfix

A set of fixes addressing poor performance of 10 in various tests:

  • Turn off main thread yielding by default, and allows enabling it separately for renderAd and processQueue.
  • update rendering logic so that it doesn't need GreedyPromise to avoid yielding;

Updated with:

  • a simple pbjs.yield flag that can turn off yielding during processQueue (defaults to on);
  • a setConfig({auctionOptions: {legacyRender: true}}) option (defaults to false) that, when enabled:
    • disables yielding during pbjs.renderAd;
    • reverts to pre-10.12 rendering logic (document.write instead of the extra iframe)

We're seeking an entity to give quantitative feedback on this branch.

@github-actions
Copy link

Tread carefully! This PR adds 3 linter errors (possibly disabled through directives):

  • test/spec/unit/pbjs_api_spec.js (+3 errors)

@github-actions
Copy link

Tread carefully! This PR adds 3 linter errors (possibly disabled through directives):

  • test/spec/unit/pbjs_api_spec.js (+3 errors)

@github-actions
Copy link

Tread carefully! This PR adds 1 linter error (possibly disabled through directives):

  • src/prebid.ts (+1 error)

@dgirardi dgirardi changed the title turn off yielding with scheudler === false Core: granular settings for main thread yielding Aug 21, 2025
@coveralls
Copy link
Collaborator

coveralls commented Aug 21, 2025

Pull Request Test Coverage Report for Build 19938887501

Details

  • 181 of 186 (97.31%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 96.21%

Changes Missing Coverage Covered Lines Changed/Added Lines %
modules/topLevelPaapi.js 11 12 91.67%
src/adRendering.ts 16 17 94.12%
src/prebid.ts 10 11 90.91%
src/config.ts 22 24 91.67%
Totals Coverage Status
Change from base Build 19900522067: 0.002%
Covered Lines: 205189
Relevant Lines: 213272

💛 - Coveralls

@dgirardi dgirardi marked this pull request as ready for review August 27, 2025 14:52
@ChrisHuie ChrisHuie requested a review from Fawke August 27, 2025 16:51
@dgirardi dgirardi changed the title Core: granular settings for main thread yielding Core: granular settings for main thread yielding; turn yielding off; re-expose requestBids.before Aug 27, 2025
@dgirardi dgirardi mentioned this pull request Sep 29, 2025
@dgirardi dgirardi mentioned this pull request Oct 1, 2025
1 task
@patmmccann patmmccann changed the title Core: granular settings for main thread yielding; turn yielding off; re-expose requestBids.before Core: granular settings for main thread yielding; turn yielding off Oct 3, 2025
@patmmccann patmmccann changed the title Core: granular settings for main thread yielding; turn yielding off Core: granular settings for main thread yielding; turn yielding off - Seeking Quantitative Testers Oct 3, 2025
@patmmccann
Copy link
Collaborator

marking do not merge while we continue to seek large companies to test this idea

@patmmccann patmmccann removed the request for review from lksharma December 3, 2025 19:05
@dgirardi dgirardi changed the title Core: granular settings for main thread yielding; turn yielding off - Seeking Quantitative Testers Core: granular settings for main thread yielding - Seeking Quantitative Testers Dec 4, 2025
@dgirardi
Copy link
Collaborator Author

dgirardi commented Dec 4, 2025

Updated with:

  • a simple pbjs.yield flag that can turn off yielding during processQueue (defaults to on);
  • a setConfig({auctionOptions: {legacyRender: true}}) option (defaults to false) that, when enabled:
    • disables yielding during pbjs.renderAd;
    • reverts to pre-10.12 rendering logic (document.write instead of the extra iframe)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prebid 10.12.0 prebid.renderAd does not render certain banner ads that break out of the frame but do not walk up additional frames anymore

7 participants