New issue
Advanced search Search tips

Issue 685573 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 593477



Sign in to add a comment

Improve code caching

Project Member Reported by vogelheim@chromium.org, Jan 26 2017

Issue description

Details & design doc TBD.


We want to improve code caching [1], particularly in two aspects:
- Currently, code caching triggers only rarely, meaning that some of its potential is wastes.
- Currently, code caching makes all decisions at initial compile time, which forces its implementation to be rather conservative.

The idea, roughly, is to change the code caching implementation to allow incremental updates to the code cache. That way, we could do less caching up-front (which is currently a costly operation, and its costliness is one of the reasons why we trigger so conservatively), and instead update the cache after the initial compile, maybe function-by-function.


[1] https://blog.chromium.org/2015/03/new-javascript-techniques-for-rapid.html
 

Comment 1 by marja@chromium.org, Jan 26 2017

Blocking: 593477

Comment 2 by bmau...@fb.com, Feb 3 2017

Labels: DevRel-Facebook

Comment 3 by bmau...@fb.com, Feb 3 2017

One thing to keep in mind, currently our code looks something like this:

__d("Module1", ["Dep1","Dep2"], function(Dep1, Dep2) { module.exports = ... });
__d("Module2", ["Dep1","Dep2"], function(Dep1, Dep2) { module.exports = ... });

So any incremental updates we did would likely consist of giving a new version of one of these modules (and the function we pass to the __d function)
#3: This issue is primarily about improving the existing code caching mechanism. It's not about extending the reach of the feature, e.g. mixing content from different (versions of) resources, or exposing control of the cache to web developers via ServiceWorkers (or some-such).

(The mechanism would likely be beneficial for doing any of those things, however, in case we do want to go down that path.)


Comment 6 Deleted

Sign in to add a comment