Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

Deduplicate script fetches #152

Open
taymonbeal opened this issue Jun 4, 2021 · 5 comments
Open

Deduplicate script fetches #152

taymonbeal opened this issue Jun 4, 2021 · 5 comments

Comments

@taymonbeal
Copy link
Member

As of #20, if n interest groups in a single auction all use the same biddingLogicUrl, we fetch it n times. This is clearly undesirable.

taymonbeal added a commit to taymonbeal/fledge-shim that referenced this issue Jun 4, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (google#147)
- trustedBiddingSignalsKeys (google#148)
- auctionSignals (google#149)
- browserSignals (google#150)
- Timeouts (google#151)
- Deduplication of script fetches (google#152)
- Optimization of worker support code (google#153)
- Public TypeScript typings for worklet script authors (google#154)

Fixes: google#20
@jeffkaufman
Copy link
Contributor

Does this actually cause multiple fetches on the wire? I would expect them to hit the browser cache, and be very fast?

@taymonbeal
Copy link
Member Author

Good question. In principle it could always depend on the cache headers, and explicit reliance on browser cache has bitten us before in other contexts. I think it's probably better to do whatever Chrome does; I vaguely recall that they do explicit deduplication, but I'm not confident in that and should check.

@taymonbeal
Copy link
Member Author

Also, the fetches go out in parallel, not serially. Does Chrome wait for the first response in that case to see if it's cacheable? If not then this won't work.

@taymonbeal
Copy link
Member Author

(I do not currently make any attempt at all to test the interaction of any of this code with browser-cache behavior. I'm not sure to what extent Service Workers make this possible.)

@jeffkaufman
Copy link
Contributor

It should work fine with parallel requests: chrome or any other browser will notice that it has multiple outstanding requests for the same resource, and wait for them to come back

taymonbeal added a commit to taymonbeal/fledge-shim that referenced this issue Jun 8, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (google#147)
- trustedBiddingSignalsKeys (google#148)
- auctionSignals (google#149)
- browserSignals (google#150)
- Timeouts (google#151)
- Deduplication of script fetches (google#152)
- Optimization of worker support code (google#153)
- Public TypeScript typings for worklet script authors (google#154)

Fixes: google#20
taymonbeal added a commit to taymonbeal/fledge-shim that referenced this issue Jun 8, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (google#147)
- trustedBiddingSignalsKeys (google#148)
- auctionSignals (google#149)
- browserSignals (google#150)
- Timeouts (google#151)
- Deduplication of script fetches (google#152)
- Optimization of worker support code (google#153)
- Public TypeScript typings for worklet script authors (google#154)

Fixes: google#20
taymonbeal added a commit to taymonbeal/fledge-shim that referenced this issue Jun 8, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (google#147)
- trustedBiddingSignalsKeys (google#148)
- auctionSignals (google#149)
- browserSignals (google#150)
- Timeouts (google#151)
- Deduplication of script fetches (google#152)
- Optimization of worker support code (google#153)
- Public TypeScript typings for worklet script authors (google#154)

Fixes: google#20
taymonbeal added a commit to taymonbeal/fledge-shim that referenced this issue Jun 8, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (google#147)
- trustedBiddingSignalsKeys (google#148)
- auctionSignals (google#149)
- browserSignals (google#150)
- Timeouts (google#151)
- Deduplication of script fetches (google#152)
- Optimization of worker support code (google#153)
- Public TypeScript typings for worklet script authors (google#154)

Fixes: google#20
taymonbeal added a commit to taymonbeal/fledge-shim that referenced this issue Jun 8, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (google#147)
- trustedBiddingSignalsKeys (google#148)
- auctionSignals (google#149)
- browserSignals (google#150)
- Timeouts (google#151)
- Deduplication of script fetches (google#152)
- Optimization of worker support code (google#153)
- Public TypeScript typings for worklet script authors (google#154)

Fixes: google#20
taymonbeal added a commit to taymonbeal/fledge-shim that referenced this issue Jun 8, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (google#147)
- trustedBiddingSignalsKeys (google#148)
- auctionSignals (google#149)
- browserSignals (google#150)
- Timeouts (google#151)
- Deduplication of script fetches (google#152)
- Optimization of worker support code (google#153)
- Public TypeScript typings for worklet script authors (google#154)

Fixes: google#20
taymonbeal added a commit that referenced this issue Jun 8, 2021
This is the minimum working implementation. Features to be added later include:
- Arbitrary metadata instead of just a static price (#147)
- trustedBiddingSignalsKeys (#148)
- auctionSignals (#149)
- browserSignals (#150)
- Timeouts (#151)
- Deduplication of script fetches (#152)
- Optimization of worker support code (#153)
- Public TypeScript typings for worklet script authors (#154)

Fixes: #20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants