It would allow you to fetch a graph of modules (with names) in order from leaves, and execute the leaves as they come. Today, if you have a -> b -> c and you push c, b, then a, you still have to wait for a to evaluate c, because top import in a is what kicks off eval.
-
-
In a large graph, this means that you can't start executing at all until you have an entire subgraph starting from the root, which is deeply suboptimal compared to topsorting the modules and evalling the leaves upward.
1 reply 0 retweets 2 likes -
Suboptimal as in: you would notice this in a big way.
1 reply 0 retweets 1 like -
Replying to @wycats @MattWilcox
To check we're on the same page, you're saying that: If 'c' changes the background color of body to red, you'd expect the bg to become red if <link rel=modulepreload href=a>?
1 reply 0 retweets 0 likes -
Replying to @jaffathecake @MattWilcox
I'm saying that yes, but (1) maybe modulepreeval, and (2) not because I want that side effect, but just to allow interleaving of fetch/eval and control latency.
2 replies 0 retweets 0 likes -
I think you are saying you want module loading, but without the deterministic execution, right? AMD worked this way IIRC.
1 reply 0 retweets 0 likes -
Fine, I'll write it up. Probably will be noticed in a year or two ;)
#StoryOfMyLife1 reply 0 retweets 1 like -
So I take this to mean this is *not* what you're after? I'm really trying to understand. I *do* see the appeal of non-deterministic execution.
2 replies 0 retweets 0 likes -
It's not really about determinism. It's about letting a smart server push a leaf first in response to a top-level request and have the browser eval it right away.
1 reply 0 retweets 0 likes -
Replying to @wycats @matthewcp and
I've been pondering if I can force this through service worker lately. You can .postMessage to clients; would at least allow experimentation
1 reply 0 retweets 1 like
That's my plan.
-
-
Replying to @wycats @bradleymeck and
Just tired of "H2! Solves everything!"
@jaffathecake's posts are one aspect. This is another. We have miles to go before we sleep, and should keep pushing forward without H2 reliance for the time being. SW is great!0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.