Skip to content

Don't Load GVL v1 for TCF2 (+ TCF1 Cleanup) #1693

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

Merged
merged 4 commits into from
Feb 16, 2021

Conversation

SyntaxNode
Copy link
Contributor

Partially addresses #1689 and separates the TCF1 vs TCF2 fetchers for easy removal of TCF2 in the near future and removal now for TCF1 url construction.

latestVersion := saveOne(ctx, client, urlMaker(0, tcfSpecVersion), saver, tcfSpecVersion)
func preloadCache(ctx context.Context, client *http.Client, urlMaker func(uint16) string, saver saveVendors) {
latestVersion := saveOne(ctx, client, urlMaker(0), saver)
firstVersion := uint16(2) // The GVL for TCF2 has no vendors defined and is very unlikely to be used. Don't load it.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete comment. It is the first version of the GVL for TCF2 that has no vendors, not all TCF2 GVLs. :)

hhhjort
hhhjort previously approved these changes Feb 9, 2021
Copy link
Collaborator

@hhhjort hhhjort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SyntaxNode SyntaxNode assigned mansinahar and unassigned bsardo Feb 9, 2021
@SyntaxNode SyntaxNode requested review from mansinahar and removed request for bsardo February 9, 2021 18:20
@SyntaxNode SyntaxNode assigned bsardo and unassigned mansinahar Feb 11, 2021
@SyntaxNode SyntaxNode requested review from bsardo and removed request for mansinahar February 11, 2021 18:19
latestVersion := saveOne(ctx, client, urlMaker(0, tcfSpecVersion), saver, tcfSpecVersion)
func preloadCache(ctx context.Context, client *http.Client, urlMaker func(uint16) string, saver saveVendors) {
latestVersion := saveOne(ctx, client, urlMaker(0), saver)
firstVersion := uint16(2) // The first version of the GVL for TCF2 has no vendors defined and is very unlikely to be used. Don't preload it.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on calling this secondVersion instead of firstVersion and moving this comment to just above the for loop that follows this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about firstVersionToLoad? That's a more a accurate description IMHO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Collaborator

@bsardo bsardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SyntaxNode SyntaxNode merged commit cda3f0f into prebid:master Feb 16, 2021
@SyntaxNode SyntaxNode deleted the tcf2-gvl-optimization branch March 11, 2021 17:24
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

Successfully merging this pull request may close these issues.

4 participants