Closed Bug 1916960 Opened 25 days ago Closed 6 days ago

Integrate SharedSubResourceCache into DevTools network monitor

Categories

(DevTools :: Netmonitor, task)

task

Tracking

(firefox132 fixed)

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 2 open bugs)

Details

Attachments

(12 files, 2 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Similar to bug 1722759, we have in-process cache for CSS (mozilla::SharedStyleSheetCache), and JS (mozilla::dom::SharedScriptCache, preffed off by default).

When those cache is used, the request doesn't go to necko, and the network request is not recorded in the DevTools Network Monitor.
We should integrate the SharedSubResourceCache's result into Network Monitor, so that the cached case is also shown there, in the same way as image's cache.

bug 1899734 is similar issue for performance API, which I already have a patch stack to fix.
I'll look into this after the bug.

Blocks: stencil-nav

The network monitor code seems to require an nsIHttpChannel, and the image loader is creating a dummy channel with dummy header for the cached case.

If we follow that style, it means the SharedSubResourceCache's cached case (either complete or pending/loading) also need to create a dummy channel (for the first load in the document).
I wonder if there can be some performance impact, or there can be some other concern.

emilio, can I have your opinion?
Do you see any possible issue?

Flags: needinfo?(emilio)

:shasha is looking at this in bug 1884876... I think creating a cache is ok as long as we do it only conditional on DevTools being open (which is the HasObservers call she has there).

Flags: needinfo?(emilio)
See Also: → 1884876

Thanks!
Indeed it's the same issue. I'll close this bug and look into the patch there.

Status: NEW → RESOLVED
Closed: 24 days ago
Duplicate of bug: 1884876
Resolution: --- → DUPLICATE

Actually, there are some more work necessary to make all cases (loading/pending caches, and non-<link> cases) handled for sub resource cache.

Status: RESOLVED → REOPENED
No longer duplicate of bug: 1884876
Resolution: DUPLICATE → ---
See Also: → 1916977
Assignee: nobody → arai.unmht

bug 1899734 will add cached-data handling, and we can add more info there for the HTTP headers for DevTools/WebDriver notifications as well, in bug 1915626.

We'll still need to use different conditions for triggering the notification, because the notification with channel is high-cost, while the performance API integration doesn't require the channel and also it needs to be performed unconditionally.

Also bug 1919218 is for unifying the notifications for image/css/js, with fixing the consumers at the same time.

Attachment #9425260 - Attachment is obsolete: true
Attachment #9425259 - Attachment description: Bug 1916960 - Part 3: Trigger notification of the cached load in all complete-cache caces. r?emilio! → Bug 1916960 - Part 3: Trigger notification of the cached load in all caces. r?emilio!
Attachment #9425872 - Attachment is obsolete: true
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/248f51d7b630 Part 1: Add helper function to create a channel for stylesheet. r=emilio https://hg.mozilla.org/integration/autoland/rev/2a7c72f1d4a2 Part 2: Move the use-counter and loads-performed handling out of CreateSheet. r=emilio https://hg.mozilla.org/integration/autoland/rev/9665162d9882 Part 3: Trigger notification of the cached load in all caces. r=emilio https://hg.mozilla.org/integration/autoland/rev/87e5eee230b9 Part 5: Use the correct CORSMode value for notification. r=emilio https://hg.mozilla.org/integration/autoland/rev/77456d1f70d0 Part 6: Trigger notification for all channels. r=emilio https://hg.mozilla.org/integration/autoland/rev/98a32fe3d03f Part 7: Add TODO for filling more fields in the notification. r=emilio https://hg.mozilla.org/integration/autoland/rev/e327d3a05d80 Part 8: Handle http-on-stylesheet-cache-response in DevTools network monitor. r=jdescottes,devtools-reviewers https://hg.mozilla.org/integration/autoland/rev/a1e031eb440d Part 9: Add tests for CSS cache in DevTools. r=jdescottes,devtools-reviewers https://hg.mozilla.org/integration/autoland/rev/4e0d1427f4af Part 10: Trigger notification for the cached script load. r=bthrall https://hg.mozilla.org/integration/autoland/rev/71f9b6e37759 Part 11: Handle http-on-resource-cache-response in DevTools network monitor. r=jdescottes,devtools-reviewers https://hg.mozilla.org/integration/autoland/rev/1f30191c85d8 Part 12: Add tests for JS cache in DevTools. r=jdescottes,devtools-reviewers https://hg.mozilla.org/integration/autoland/rev/331d2711a95b Part 13: Enable web-platform-test for WebDriver BiDi with cached stylesheets. r=jdescottes,webdriver-reviewers,whimboo
Regressions: 1921726
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: