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

Multibid scoring context sharing #1369

Open
corywalker opened this issue Dec 16, 2024 · 1 comment
Open

Multibid scoring context sharing #1369

corywalker opened this issue Dec 16, 2024 · 1 comment

Comments

@corywalker
Copy link

We're testing multibid (#1048) support. I'm looking at some traces and if multiple ads need to be scored from an IG, I see one context getting created for each ad. I'm hoping at the least it could make sense to share contexts across ads in the same IG. If we can share across an even broader scope than IG that could also help with efficiency (for example in the same joining-origin, similar to groupByOrigin).

@MattMenke2
Copy link
Contributor

MattMenke2 commented Jan 6, 2025

Note that for bids generated by different IGs, we could at best match the groupByOrigin behavior, rather than relying on same joining-origin, for the same reason groupByOrigin is needed in the first place (leaves / joins from other joining origins can leak data across origins), so we'd need same joining origin, and groupByOrigin to be true.

Unclear if there's reason to be concerned about different IG owners as well, but probably safest to require that to be the same as well.

Sharing context when the IG that generated the bid is the same should of course always be safe.

The main complexity in implementing this is that we only copy some data into the Javascript address space on first access, so if you preserve, say, the auctionConfig argument between JS calls, and only access access member fields from the value passed on the first call in the second call, we can't provide the information to JS, since we've already discarded it. We have the same issue for bidders, where we actually provide the wrong information (I think we provide the data from the current bid instead, which isn't great). Anyhow, we'd need to hook up something in that case for seller worklet reuse as well.

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

2 participants