Closed Bug 1896709 Opened 6 months ago Closed 4 months ago

Implement initial prototype of the on-memory cache of JS::Stencil based on SharedSubResourceCache behind a pref

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(17 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
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

Bug 1729488 added mozilla::SharedSubResourceCache, which can be used also by JS to cache the compiled stencil across documents and navigation.

This can reduce the cost of IPC as long as the cache doesn't expire, and also make it possible to cache more eagerly.

bug 1879123 can be a further optimization after this, to reduce the cost of IPC when the cache expires but the server returns the same data.

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Depends on: 1899734
Depends on: 1905597
Depends on: 1906393
Depends on: 1906394
Summary: Implement on-memory cache of JS::Stencil based on SharedSubResourceCache → Implement initial prototype of the on-memory cache of JS::Stencil based on SharedSubResourceCache behind a pref

Given there are multiple tasks necessary before enabling the navigation cache, let's land the initial prototype behind a pref,
so that other tasks can be done based on this concurrently.

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/89c4c6bb465a Part 1: Add const variant of LoadContextBase::AsWindowContext. r=nbp https://hg.mozilla.org/integration/autoland/rev/50b0f6a23e3c Part 2: Add const variant of ScriptLoadRequest::GetScriptLoadContext. r=nbp https://hg.mozilla.org/integration/autoland/rev/34fc79dc1ad7 Part 3: Add LoadedScript::CanHaveBytecode. r=nbp https://hg.mozilla.org/integration/autoland/rev/52ce0ebfb29a Part 4: Accumulate cache expiration time in script load. r=nbp https://hg.mozilla.org/integration/autoland/rev/220b544127cb Part 5: Add ScriptLoadRequest::IsCacheable. r=nbp https://hg.mozilla.org/integration/autoland/rev/54eea04a7342 Part 6: Add JSExecutionContext::{SetKeepStencil,StealStencil}. r=nbp https://hg.mozilla.org/integration/autoland/rev/842f2047a4bd Part 7: Add pref for nagivation cache. r=nbp https://hg.mozilla.org/integration/autoland/rev/e8615b5d82ab Part 8: Add Stencil variant to LoadedScript. r=nbp https://hg.mozilla.org/integration/autoland/rev/6c9338852a19 Part 9: Add ScriptLoadRequest::CacheEntryFound. r=nbp https://hg.mozilla.org/integration/autoland/rev/20ff83806cc6 Part 10: Add SharedScriptCache. r=nbp https://hg.mozilla.org/integration/autoland/rev/8ca8a4082e44 Part 11: Add PContent::ClearScriptCache. r=nbp https://hg.mozilla.org/integration/autoland/rev/c6878c5fdde4 Part 12: Add SharedScriptCache field to ScriptLoader. r=nbp https://hg.mozilla.org/integration/autoland/rev/b7bcb9904435 Part 13: Use SharedSubResourceCache in ScriptLoader. r=nbp https://hg.mozilla.org/integration/autoland/rev/6fa3424dfc40 Part 14: Add ChromeUtils.clearScriptCache* methods. r=nbp https://hg.mozilla.org/integration/autoland/rev/26fac760de19 Part 15: Add nsIDOMWindowUtils.clearSharedScriptCache. r=nbp https://hg.mozilla.org/integration/autoland/rev/0271e50308e6 Part 16: Integrate into nsIClearDataService. r=nbp,extension-reviewers,robwu https://hg.mozilla.org/integration/autoland/rev/046f0f522ce7 Part 17: Add tests. r=nbp

Backed out for causing build bustage and mochitest failures

Backout link

Push with failures

Failure log - bustage
Failure log - mochitest

Flags: needinfo?(arai.unmht)
Flags: needinfo?(arai.unmht)
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/2c37eaabbc74 Part 1: Add const variant of LoadContextBase::AsWindowContext. r=nbp https://hg.mozilla.org/integration/autoland/rev/3bdc257459a7 Part 2: Add const variant of ScriptLoadRequest::GetScriptLoadContext. r=nbp https://hg.mozilla.org/integration/autoland/rev/3de0c9879853 Part 3: Add LoadedScript::CanHaveBytecode. r=nbp https://hg.mozilla.org/integration/autoland/rev/612ca40ba579 Part 4: Accumulate cache expiration time in script load. r=nbp https://hg.mozilla.org/integration/autoland/rev/c0f31a4239be Part 5: Add ScriptLoadRequest::IsCacheable. r=nbp https://hg.mozilla.org/integration/autoland/rev/6ec335dbf1e6 Part 6: Add JSExecutionContext::{SetKeepStencil,StealStencil}. r=nbp https://hg.mozilla.org/integration/autoland/rev/30f926126ce2 Part 7: Add pref for nagivation cache. r=nbp https://hg.mozilla.org/integration/autoland/rev/674b0b86b1d4 Part 8: Add Stencil variant to LoadedScript. r=nbp https://hg.mozilla.org/integration/autoland/rev/91e9ae3ba36b Part 9: Add ScriptLoadRequest::CacheEntryFound. r=nbp https://hg.mozilla.org/integration/autoland/rev/087e11d47655 Part 10: Add SharedScriptCache. r=nbp https://hg.mozilla.org/integration/autoland/rev/c67c0db794de Part 11: Add PContent::ClearScriptCache. r=nbp https://hg.mozilla.org/integration/autoland/rev/b76b7c999b9d Part 12: Add SharedScriptCache field to ScriptLoader. r=nbp https://hg.mozilla.org/integration/autoland/rev/096b5dc2562a Part 13: Use SharedSubResourceCache in ScriptLoader. r=nbp https://hg.mozilla.org/integration/autoland/rev/61e179e69463 Part 14: Add ChromeUtils.clearScriptCache* methods. r=nbp https://hg.mozilla.org/integration/autoland/rev/579d73aad3a4 Part 15: Add nsIDOMWindowUtils.clearSharedScriptCache. r=nbp https://hg.mozilla.org/integration/autoland/rev/8fed68bb46ba Part 16: Integrate into nsIClearDataService. r=nbp,extension-reviewers,robwu https://hg.mozilla.org/integration/autoland/rev/5b86cade5cdc Part 17: Add tests. r=nbp
See Also: → 1916977
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: