Re: Bundling vs sending serialized dependency graph

2014-08-25 Thread Ian Hickson
On Fri, 22 Aug 2014, Marius Gundersen wrote: One way to do this would be to predeclare the modules, as in: script type=module src=a.js id=a needs=c load-policy=when-needed /script script type=module src=b.js id=b needs=c load-policy=when-needed /script script

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread C. Scott Ananian
On Thu, Aug 21, 2014 at 11:00 AM, John Barton johnjbar...@google.com wrote: Finally, it would be ideal if we could also adjust those dependencies on the fly, since if we're reflecting dependencies described in the mutable DOM structure, it might be mutated. I think this one is technically

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread John Barton
On Thu, Aug 21, 2014 at 8:37 AM, C. Scott Ananian ecmascr...@cscott.net wrote: On Thu, Aug 21, 2014 at 11:00 AM, John Barton johnjbar...@google.com wrote: Finally, it would be ideal if we could also adjust those dependencies on the fly, since if we're reflecting dependencies described in

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread C. Scott Ananian
On Thu, Aug 21, 2014 at 11:54 AM, John Barton johnjbar...@google.com wrote: On Thu, Aug 21, 2014 at 8:37 AM, C. Scott Ananian ecmascr...@cscott.net wrote: Where? The Load Request records imply a dependency graph. Are these maintained though out the life of the page? I don't see any existing

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread Ian Hickson
On Thu, 21 Aug 2014, C. Scott Ananian wrote: On Thu, Aug 21, 2014 at 11:54 AM, John Barton johnjbar...@google.com wrote: Where? The Load Request records imply a dependency graph. Are these maintained though out the life of the page? I don't see any existing reason to expect these are

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread Russell Leggett
Not sure if my real world use case would be super helpful here, but just in case, here it is. The app I work on is a very large single page app - over 150,000 lines of JS across more than 2000 files. Uncompressed, unminified, and concatenated together, it weighs in at close to 10MB. We've been

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread Ian Hickson
On Thu, 21 Aug 2014, John Barton wrote: I think your graph is upside down from mine ;-) As I learned it, leaf nodes were the ones at the ends of branches and hence were not dependent on any other nodes; no node depended on a root node. I don't really mind which way we view the graph. To

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread John Barton
On Thu, Aug 21, 2014 at 1:55 PM, Ian Hickson i...@hixie.ch wrote: On Thu, 21 Aug 2014, John Barton wrote: ... more misunderstanding about bundles skipped... Let's give upon discussing bundles and pursue your dependency list scheme. I don't think it should be particularly complex. It

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread Ian Hickson
On Thu, 21 Aug 2014, John Barton wrote: I'm not sure what you mean here. The list returned from instantiate is treated the exact same way as the list auto-discovered from import statements when instantiate returns undefined: it's passed to ProcessLoadDependencies(), which calls

Re: Bundling vs sending serialized dependency graph

2014-08-20 Thread Ian Hickson
On Wed, Aug 20, 2014 at 4:06 PM, John Barton johnjbar...@google.com wrote: On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson i...@hixie.ch wrote: This just doens't work. Suppose the dependency graph looks like this: Feature A -- Dependency A1 \__\ Dependency\ Feature B --