Open Bug 1670403 (stencil-nav) Opened 4 years ago Updated 2 months ago

[meta] Cache Stencils across Documents

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

People

(Reporter: tcampbell, Unassigned)

References

(Depends on 10 open bugs, Blocks 2 open bugs)

Details

(Keywords: meta)

In the same vein as Bug 1599160, we would like to take advantage of Stencil being agnostic of documents/globals in order to reuse the parsed result across navigations.

The minimal objective here is to support directly re-using Stencil across same-origin navigations using an in-memory cache. This will target large JS bundle files that are common across multiple articles on a news site, for example.

Making multi-page websites perform like single-page-apps is the broad objective.

The Phase 2 Capabilities that improve performance and memory usage for existing use cases will also contribute significantly to the performance of this cache and reduce its overhead.

Once we have this base capability, we can build on this in very interesting ways:

  • Unify this in-memory cache with the on-disk JS Bytecode Cache workflow to make JSBC more asynchronous.
  • Unified sub-resource caching where the eviction and scheduling policies for JS, CSS, and images in a page can be consistently applied.
  • Use other strategies to pre-warm the cache with Stencils that we expect to need, including cross-site hints when reasonable.
  • Store certain JIT hinting across documents such as Warp inlining data, in order for the new document to JIT earlier.
Blocks: 1685082
Depends on: 1724236
Depends on: 1757833
Depends on: 1768255
Depends on: 1768679
Depends on: 1759123
Depends on: 1773319
Depends on: 1773339
Depends on: 1783948
Depends on: 1786007
Severity: S2 → N/A
Depends on: 1794288
Depends on: 1794589
Depends on: 1799960
Depends on: 1814634
Assignee: tcampbell → nobody
Depends on: 1826663
Depends on: 1834478
Depends on: 1834483
Duplicate of this bug: 676939
Depends on: 1879123
Depends on: 1880304
Depends on: 1880453
Depends on: 1882789
Depends on: 1882793
You need to log in before you can comment on or make changes to this bug.