Service Worker fetch resources not showing up in Resource Timings

RESOLVED DUPLICATE of bug 1351521

Status

()

defect
RESOLVED DUPLICATE of bug 1351521
2 years ago
2 years ago

People

(Reporter: BenWa, Unassigned)

Tracking

(Blocks 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
When getting the Resource Timings data with:
performance.getEntriesByType("resource")

The array is empty with Service Worker. I've attached a test case that's a bit more complex then it should. Make sure to enable streams: dom.streams.enabled;true

STR:
1) Run the node webserver: ./run.sh
2) Connect to http://localhost:3000/
3) Click the link to install service worker, click the link for a normal load.

In the console type in: performance.getEntriesByType("resource")

Notice that the array is empty. Data is properly populated in Chrome. Note that the page resource timing shown in the document also stays stuck in 'Loading' which is fed from the Resource Timings data.

The performance bugs with this benchmark are all already filed so waiting for that to explore further.
Does this only happen with streams or all service worker interceptions?
Flags: needinfo?(b56girard)
(Reporter)

Comment 2

2 years ago
All service worker, it reproduces if I modify the test case to disable readable stream.

Having this broken would make it very difficult to compare how well Service Worker is working and how much it's improving the resource load times and where regressions are coming from.
Flags: needinfo?(b56girard)
Catalin, do you have any time to look at this?
Flags: needinfo?(catalin.badea392)
(Reporter)

Comment 4

2 years ago
If you want to test without readable stream just remove this line from the testcase:
return documentFetch(event);
This looks like bug 1351521.

I was looking at this issue a couple of months ago when we were in Taipei. We decided to wait because the fix would be redundant once parent interception lands. I don't have time to work on this at the moment.
Flags: needinfo?(catalin.badea392)
Thanks.  I thought we had seen it, but couldn't find it.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1351521
You need to log in before you can comment on or make changes to this bug.