Bug 210705 - Remove grandfathering from ResourceLoadStatistics
Summary: Remove grandfathering from ResourceLoadStatistics
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-18 16:11 PDT by Alex Christensen
Modified: 2022-10-10 14:28 PDT (History)
6 users (show)

See Also:


Attachments
Patch (173.36 KB, patch)
2020-04-18 16:13 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (190.78 KB, patch)
2020-04-20 14:18 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (194.18 KB, patch)
2020-04-20 15:35 PDT, Alex Christensen
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-04-18 16:11:12 PDT
Remove grandfathering from ResourceLoadStatistics
Comment 1 Alex Christensen 2020-04-18 16:13:16 PDT
Created attachment 396869 [details]
Patch
Comment 2 Sam Weinig 2020-04-18 16:16:12 PDT
Comment on attachment 396869 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396869&action=review

> Source/WebCore/loader/ResourceLoadStatistics.cpp:88
> +    encoder.encodeBool("grandfathered"_s, false);

Probably worth adding a comment explaining why this is here.

> Source/WebCore/loader/ResourceLoadStatistics.cpp:314
> +    bool unused;
> +    if (!decoder.decodeBool("grandfathered", unused))
>          return false;

Same here.
Comment 3 Sam Weinig 2020-04-18 16:16:46 PDT
Comment on attachment 396869 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396869&action=review

> Source/WebCore/ChangeLog:9
> +        Grandfathering was needed for the initial release.
> +        Now it's just a maintenance burden that doesn't do anything.

Would be good to explain what Grandfathering in this context was and why it can be removed now here.
Comment 4 Alex Christensen 2020-04-20 14:18:56 PDT
Created attachment 397015 [details]
Patch
Comment 5 Alex Christensen 2020-04-20 15:35:29 PDT
Created attachment 397023 [details]
Patch
Comment 6 John Wilander 2020-04-23 07:29:54 PDT
Sorry, I was out for a few days. Unfortunately, I don’t think we can get rid of grandfathering yet. The reason is that time limited history deletion is not yet supported. So when a user deletes history for one hour or one day, we delete all ITP data. In those cases, there will be lots of website data left and grandfathering kicks in to retain that data until ITP has had a chance to again learn which websites the user interacts with.

Support for time limited deletion is tricky. We’d have to keep a series of time stamps for every ITP data entry so that we can effectively roll ITP back in time one hour, one day, two days, or one week.
Comment 7 John Wilander 2020-04-23 07:32:29 PDT
What we could do if we want to get rid of grandfathering (which I agree is a pain) is to keep a series of time stamps only for user interaction. That is the only piece of ITP data needed to be able to retain the right website data after a partial history deletion.
Comment 8 Ahmad Saleem 2022-10-10 14:28:00 PDT
Checking via BugID, it seems this r+ patch didn't landed and also checking via code. Example:

https://github.com/WebKit/WebKit/blob/11f7471c70b0d9aff5c0bfd95d5b4175e5bf2f2d/Source/WebCore/loader/ResourceLoadStatistics.cpp#L98

Do we need this? Thanks!