--- layout: post title: "Web-Perf Wednesday 020 – Prebid Cuts Repeated Auction Work" date: 2026-12-02 12:00:00 +0000 categories: - Web Performance tags: - Web-Perf Wednesdays - JavaScript - Third Parties - Browsers show_taxonomy: true meta: "Prebid 11.55 cuts repeated auction and configuration work, while Firefox prepares to stream request bodies without buffering them in full." --- This week has been busy enough to produce one unusually useful third-party result, even if browsers themselves have mostly moved in smaller steps. Prebid 11.55 cuts two sources of repeated work in its auction machinery, with live-site profiling showing savings measured in hundreds of milliseconds. The preceding release also removes avoidable CORS preflights and corrects how storage access is rechecked. Elsewhere, Firefox 162 Beta can start uploading a request body before the browser has buffered all of it. ## Prebid Cuts Repeated Auction Work [Prebid 11.55](https://github.com/prebid/Prebid.js/releases/tag/11.55.0) contains two refactors aimed at code that runs many times during an advertising auction. Neither changes the public API, which is rather the point: publishers can remove work without changing how they call Prebid. On an advert-heavy page, that leaves useful main-thread time for everything else competing for it. The larger saving comes from `AuctionIndex`, which finds the request associated with a bid. Previously, it searched every auction retained in memory. That gets steadily more expensive on a long page that runs auctions as the reader scrolls, because each lookup has more previous auctions to inspect. A bid already contains its `auctionId`, so the [new lookup checks that auction first](https://github.com/prebid/Prebid.js/pull/16393) and falls back to the full search only if it can't find the request there. On a live news site, during a 45-second page view that scrolled to the end of the article with 4× CPU throttling, time spent in `AuctionIndex` fell from 250–400 ms to 50–80 ms. The second change fixes a smaller operation performed at remarkable frequency. Prebid's `getConfig('debug')` used to copy the whole configuration merely to read one value, and every `logMessage` call checks that setting even when debug mode is off. The [new implementation reads only the requested topic](https://github.com/prebid/Prebid.js/pull/16374), while calls without an argument still return the full configuration. Across three news sites with live bidding, the contributor recorded between 11,868 and 47,861 `getConfig` calls in a 60-second page view. Measured time in the function ranged from 80–227 ms before the change; the replacement was estimated at roughly 1–5 ms. Those figures come from particular sites and profiles, so they aren't a promise that every publisher will recover the same time. They do show why tiny helper functions deserve attention when an auction calls them tens of thousands of times. This is most likely to help long-lived article, feed, or single-page app views that refresh adverts repeatedly. If that describes your site, compare the same scroll journey before and after upgrading: keep the placements, consent state, network conditions, and auction count stable, then inspect main-thread time as well as bidding and revenue outcomes. A [third-party performance review](/consultancy/) can trace this kind of repeated library work without treating every millisecond inside an advertising bundle as equally avoidable. ## Several Bid Requests Lose a Preflight [Prebid 11.54](https://github.com/prebid/Prebid.js/releases/tag/11.54.0) changes several adapters to send their existing JSON bodies as `text/plain`. That media type can qualify as a [CORS-safelisted request header](https://fetch.spec.whatwg.org/#cors-safelisted-request-header), whereas `application/json` prompts the browser to send an `OPTIONS` request before a cross-origin `POST`. For the Adtrgtme adapter, the [change removes one preflight before every bid request](https://github.com/prebid/Prebid.js/pull/16302) while preserving the payload and credentials behaviour. [Ad2iction also verified both media types](https://github.com/prebid/Prebid.js/pull/16344) against its production endpoint before merging its equivalent change. If you use one of the affected adapters, confirm the missing `OPTIONS` request in a waterfall and watch bid responses through the upgrade; the saving depends on that adapter actually running and its endpoint continuing to accept the body. ## Storage Access Is Rechecked on Refresh The same release fixes a consent-sensitive problem in Prebid's User ID module. If storage access was denied when the module first ran and became available later, Prebid kept the first answer and continued behaving as though storage were unavailable. The [module now checks again on every refresh](https://github.com/prebid/Prebid.js/pull/16326), which fits flows where everything begins denied and a later consent or browser decision allows access. Test both directions rather than only a fresh page load: begin without access, grant it, refresh the auction, and check the identifiers and requests that follow. This is a correctness fix, but it can also change which identity work runs after consent, so a [performance audit](/performance-audits/) should keep the consent transition in its test journey. ## Firefox Starts Uploading Before the Body Is Complete Firefox 162 Beta enables [streaming request bodies by default](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/162). A page can provide a `ReadableStream` as a request body, allowing the browser to send chunks as the application produces them instead of buffering the entire upload first. The request needs [`duplex: 'half'`](https://developer.mozilla.org/en-US/docs/Web/API/Request/duplex), which means the browser still waits until it has sent the full request before it processes the response. This is useful for large generated uploads, but it isn't a reason to turn small JSON requests into streams. Firefox 162 is due to ship on 8 December, and support remains incomplete across browsers, so test the browser, server, proxy, and CDN together before depending on it. Any intermediary that buffers the body can quietly give the memory and start-time saving back. ## Need Help Finding Third-Party CPU Cost? Prebid's measurements are a good reminder that third-party cost isn't confined to downloads or one obvious auction call. Repeated lookups, configuration copies, consent transitions, and network setup can accumulate across a long session, particularly on slower phones. I can help profile a representative user journey, separate unavoidable auction work from repetition, and compare an upgrade without losing sight of bidding, consent, or revenue behaviour. You don't need a complete diagnosis before we begin; a slow trace, a crowded waterfall, or a page that gets worse the longer it stays open is plenty. If you'd like a second pair of eyes, [get in touch](/contact/). {% include web-perf-wednesdays.md %}