Closed Bug 1916601 Opened 1 year ago Closed 1 year ago

Allow caching the PerformanceTimingData for subsequent cached loads

Categories

(Core :: DOM: Performance APIs, task)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(2 files)

SharedSubResourceCache implements in-process cache for the necko's response.
If the cache is used, the fetch operation doesn't reach necko.

Currently the PerformanceResourceTiming entry for the fetch is created and added as a part of HttpBaseChannel implementation, which means if SharedSubResourceCache is used, the corresponding PerformanceResourceTiming entry is not created (bug 1899734).

In order to create a PerformanceResourceTiming entry for the cached case, a part of PerformanceResourceTiming should be cached by SharedSubResourceCache. The cached data includes the server response etc, but not including the local timing data.

It can be achieved by splitting the cacheable fields out of mozilla::dom::PerformanceTimingData into a super class (let's say CacheablePerformanceTimingData), and cache the super class in SharedSubResourceCache, and generate a new PerformanceTiming from the
CacheablePerformanceTimingData and the timing data.

mozilla::dom::PerformanceTimingData::mBodyInfoAccessAllowed and mozilla::dom::PerformanceTimingData::mTimingAllowed fields are dynamically calculated based on principal, but I'm going to cache the result given the SharedSubResourceCache's cache is also separated for each principal.

Component: DOM: Core & HTML → DOM: Performance

Bug 1899734 is going to cache the performance timing data from previous fetch
for the subsequent cached fetch.
All non-timing-related fields associated with the response are moved to
CacheablePerformanceTimingData.

Also make it possible to construct CacheablePerformanceTimingData from channels
to create a cache.

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/09c2b07d57ee Part 1: Split cacheable fields of PerformanceTimingData into CacheablePerformanceTimingData. r=sefeng https://hg.mozilla.org/integration/autoland/rev/7dbb2b29f8e5 Part 2: Allow constructing PerformanceTimingData from CacheablePerformanceTimingData and timing data. r=sefeng
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: