Open Bug 1879123 Opened 1 year ago Updated 1 year ago

Experiment associating cached content ID to necko cache and omit response when it matches consumer-cached content ID

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

ASSIGNED

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Given JS source needs to be validated for each request, the on-memory cache should ask necko whether the cache is up to date for each time.

It can be done by following:

  • associating a "content ID" to the cache
  • the content ID gets updated for each time the cache gets updated
  • the content ID is included in the response from necko
  • on ScriptLoader side, cache Stencil with the content ID
  • for subsequent request to necko, include the consumer-cached content ID
  • on necko side, when the consumer-cached content ID is same as the response's content ID, set a flag, and omit the response body
  • on ScriptLoader side, if the flag is set, use the cached Stencil, otherwise update the cache

This ensures the validity of the cache, while reducing the IPC cost.

Associate "content ID" to each cache.

Response from necko contains content ID, and consumer can cache the response
in its process.

A request for necko can have "consumer-cached content ID", to let necko know
the consumer has cached data from the previous response, and don't need the
file body if the next response has the same content ID.

ScriptLoader uses the content ID to cache the stencil, and use cached stencil
when consumer-cached content ID matches the next content ID.

This reduces the IPC cost for the script source, and also reduces the need for
bytecode cache.

Blocks: stencil-nav
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: