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: > > > > > > > > > > > > > > > > All of these scripts would need to be empedded in every page Only the ones that are needed. But actually it's not that bad. Th

Re: Bundling vs sending serialized dependency graph

2014-08-22 Thread Marius Gundersen
> One way to do this would be to predeclare the modules, as in: > > > > > > > All of these scripts would need to be empedded in every page, which would significantly increase the size of a document and the complexity in creating a document. Not everyone is making a Single P

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(), whi

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread John Barton
On Thu, Aug 21, 2014 at 1:55 PM, Ian Hickson 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 only req

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 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 usin

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 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 maintained. > > Ian

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 wrote: > On Thu, Aug 21, 2014 at 8:37 AM, C. Scott Ananian > 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 maintained.

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 wrote: > On Thu, Aug 21, 2014 at 11:00 AM, John Barton > 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, i

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 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 difficult. I d

Re: Bundling vs sending serialized dependency graph

2014-08-21 Thread John Barton
On Wed, Aug 20, 2014 at 4:53 PM, Ian Hickson wrote: > On Wed, Aug 20, 2014 at 4:06 PM, John Barton > wrote: > > On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson wrote: > >> > >> This just doens't work. > >> > >> Suppose the dependency graph looks like this: > >> > >> Feature A --> Dependency

Re: Bundling vs sending serialized dependency graph

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

Bundling vs sending serialized dependency graph

2014-08-20 Thread John Barton
On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson wrote: > > > > That's why in my opinion 'bundles' or 'packages' make sense: they > > combine the related dependencies and allow them to be loaded in one > > trip. > >... > > This just doens't work. > > Suppose the dependency graph looks like this